Re: pfDelete

New Message Reply Date view Thread view Subject view Author view

Brian P Theodore (theodore++at++cs.ucdavis.edu)
Thu, 12 Jan 1995 17:13:03 -0800


> I would like to know what's pfDelect using to free allocatd memory
> for a given pfNode if a pfGSetDeletor callback is not specified ?
> Does it uses pfFree or what?

To the first question, I don't know! But it does not use pfFree on
the node itself. If you try to use pfFree, you should get a Performer
Warning that the node base address wasn't allocated using pfMalloc.

Good question though, I had a similar problem, which I have since
worked around. But if you import in a model object, and wish to
make instances of that object (using pfClone), and later call
pfDelete on the cloned instance, it will also remove (delete) the
original object! I didn't get a warm and fuzzy feeling that memory
allocated for the instance was being freed when just calling
pfRemoveChild. Another thing I tried to before calling pfDelete
on the instance was to increase the reference count above 0, then
return it to its original state after the call to pfDelete.... Only
to find that the initial, incremented, and restored reference counts
were -1, -1, and -1 respectively!

Any insight??

Brian Theodore


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:52 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.