#include <object.h>
Data Fields | |
aspi_class_t * | klass |
int | reference_count |
To derive it, just struct foo {aspi_object_t parent, ...}
Note that you'll have to redefine the free () function in the class initializer. In the class free () function, call the parent free function.
Note that only the root free function need to do the real memory free of the object itself (of course, memory allocated for attributes of the class must be freed)
As for aspi_object_init, it must alloc the object memory only if the parameter is NULL
aspi_object (), and generally aspi_xxx () return the pointer to the object class.
Referenced by aspi_object_dup().