/ api / cat / special / _free
_free
Syntax

    GB_METHOD ( "_free" , NULL , MyClass_free , NULL )

The `_free` method is called when an object of the class is destroyed.

This method take no parameter and returns nothing.

Use this method to cleanup the object. For example, is the object structure contains references to strings or objects, you must release them, otherwise you will create memory leaks.

### See also

Special Methods Methods Implementation