On Thu, 17 Jul 2003, Brian Sheehan wrote:
Thanks Mathieu, that worked. Is it so that we never have to worry about deallocating memory that outlet_new is the only way of creating t_outlet structs?
There may be several reasons. That may be one of those. If there were outlet_init() that would not allocate but just initialize, then there would be a need for an outlet_finalize() that deinitializes but without deallocating, and maybe the memory allocation would become the caller's responsibility, or else there would have to be a flag in t_outlet to determine which way the object should be gotten rid of, finalization or also deallocation. That would be somewhat more difficult for almost no reward. That is, unless completely automated deallocation (refcount or marksweep) is implemented in PD, but I don't think that will ever happen.
Else it allows the size of t_outlet to change in PD without recompiling all externals.
________________________________________________________________ Mathieu Bouchard http://artengine.ca/matju