Re: pfDelete question

New Message Reply Date view Thread view Subject view Author view

Kowsik Guruswamy (kowsik++at++buggy.coryphaeus.com)
Mon, 31 Jul 1995 09:43:09 -0700


On Jul 28, 6:01pm, Ken Sakai wrote:
> Subject: pfDelete question
>
>
> I have a simple question regarding pfDelete.
> If one does a pfDelete on a pfGeoSet, does one
> have to worry about pfFree'ing the geoSet attribute
> arrays that one can retrieve using pfGetGSetAttrLists()
> and length arrays from pfGetGSetPrimLengths()? I have seen
> code fragments that simply pfDelete the geoSet without
> bothering with the aformentioned data. Would this result
> in a memory leak or is the data automatically dereferenced
> and deleted when the geoSet is deleted?

[snip]

>From the Performer man pages:

     If attribute and index lists are allocated from the pfMalloc routines,
     pfGSetAttr will correctly update the reference counts of the lists.
     Specifically, pfGSetAttr will decrement the reference counts of the old
     lists and increment the reference counts of the new lists. It will not
     free any lists whose reference counts reach 0. When a pfGeoSet is
     deleted with pfDelete, all pfMalloc'ed lists will have their reference
     counts decremented by one and will be freed if their count reaches 0.

Hope that helps,

K.

-- 
kowsik++at++coryphaeus.com

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:51:43 PDT

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