Re: pfDelete....

New Message Reply Date view Thread view Subject view Author view

John Rohlf (jrohlf++at++tubes)
Tue, 1 Mar 94 11:25:57 PST


>
> Part of my scene consist of a pfGeode with a gset. The vertices, colors and
> normals in the gset has been allocated with pfMalloc(..., NULL); and added to
> the gset with pfGSetAttr(...);
>
> When I call pfDelete(myGeode); will it deallocate the gset itself and all the
> memory used by the user supplied vertices, colors and normals (allocated by
> pfMalloc(...), and hence should have a ref count)?

        Yes. You do not normally need to bother with reference counts.
        pfMalloc'ed arrays are automatically reference-counted by the
        pfGeoSet. If an array is referenced by multiple geosets, it will
        not be deleted until the last geoset which references it is
        deleted.

>
> Or, do I have to add a pfDeleteFunc to gset which then should delete verices,
> etc.?

        pfDeleteFunc is only for deleting user data specified by pfUserData.


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:11 PDT

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