Angus Dorbie (dorbie++at++sgi.com)
Thu, 29 Jul 1999 16:28:46 -0700
I have personally experienced the havoc mentioned in this email.
Although the data is deleted it is still there in the address space and
will get corrupted at some random point in future, using the pointer to
read and write will not cause a problem initially. This can be
murderously hard to debug until you realize what has happened and IMHO
it is a surprising design decision for Performer.
Note that this is an unrefdelete so if it's the right type of pfmemory
allocation then it will be reference counted and the delete will not
happen until the count equals zero so if you have incremented the
reference counter somehow then the data will in fact be safe. This may
also explain your lack of adverse effects.
Cheers,ANgus.
"Acosta, Mark W" wrote:
>
> Hi all,
> I was looking through the man page for pfObject when I came across
> pfObject::setDeleteFunc. According to the text, the default behavior on
> deleting an object with non null user data is to call pfUnrefDelete on the
> user data. Maybe I'm reading this wrong, but is Performer actually doing
> this? I have user data in several places in my application and if Performer
> is trying to pfUnrefDelete it, I thing it would have caused all sorts of
> havoc in the program. Anyone know what's really going on here?
>
> Thanks,
>
> Mark Acosta
> Texaco
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
--
Never express yourself more clearly than you think.
Neils Bohr
Read this:
http://www.vcnet.com/bms/features/3d.html
For advanced 3D graphics Performer + OpenGL based examples and tutors:
http://www.dorbie.com/
This archive was generated by hypermail 2.0b2 on Thu Jul 29 1999 - 16:28:52 PDT