# classname_fieldname_erase

> This function removes an the `optional struct` from the object layout.

### Prototype

>         MCO_RET	classname_fieldname_erase(	/*IN*/ classname *handle );

### Arguments

handle | A pointer to a classname handle

### Description

> The erase method removes an optional struct field from the object layout and all indexes the field is included into.

### Return Codes

MCO_S_OK | The `optional struct` was erased successfully
MCO_E_EMPTYOPTIONAL | The `optional struct` field was not yet allocated

Related Topics