> I don't like the style of coding in ccsObjectAddInterface() - if either
> realloc fails then the object is hosed. Admittedly FALSE is returned to
> inform the caller, but I'd prefer the object to remain viable and just the
> call to fail. Anything else can cause nasty surprises in client code.
> (Admittedly, if realloc fails there are probably worse problems to deal with.)
Forgot to mention: the cost of calling realloc in ccsObjectRemoveInterface probably outweighs any saving of memory that results.
> I don't like the style of coding in ccsObjectAddInt erface( ) - if either
> realloc fails then the object is hosed. Admittedly FALSE is returned to
> inform the caller, but I'd prefer the object to remain viable and just the
> call to fail. Anything else can cause nasty surprises in client code.
> (Admittedly, if realloc fails there are probably worse problems to deal with.)
Forgot to mention: the cost of calling realloc in ccsObjectRemove Interface probably outweighs any saving of memory that results.