adavydow/scheme-maker-we — Issue #7: ..Delete(self)
Author: adavydow
Created: 2011-10-12 00:13:41+00:00
State: open

It's better to split XXX_Delete(total desturction of the object) and XXX_Free (destruction of the fields of the object).
voidl XXX_Delete(XXX *self) {
XXX_Free(XXX *self);
free(self);
}
And something similar for constructors:
XXX *XXX_New(args) {
XXX *ret = malloc(sizeof(XXX));
XXX_Init(XXX, args);
}
Why?
Now it's extremely difficult to work with arrays. (both allocation and destruction);