Re: [info-performer] Problems deleting nodes between frames

Date view Thread view Subject view Author view

From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 01/09/2004 21:23:18


Hi Jaroslav !

I modified your sample to make it run. I replaced your code with:

        pfGroup* gr = new pfGroup;
        gr -> ref();
        pfUnrefDelete(gr);

Your code invokes the function pfMemory::unrefDelete. Without going into too
many boring details I'll say that pfMemory::unrefDelete is relevant when you
only use libpr objects (single-buffered objects). We keep this function for
backwards compatibility. Most customers today do not use libpr exclusively.

The correct function is pfUnrefDelete. It translates into
pfBuffer::unrefDelete. When you use pfUnrefDelete it detects libpr/libpf
objects and does the right thing.

-yair

>
> Hi All!
> I'm trying to make some changes to my scene graph between frames but it
> crashes in pfSync() probably because of the delayed deletes that take place
> there. I finished with the most simple case just inserting following lines
> of code in the loop of simple.cxx sample and it behaves the same:
>
> pfGroup* gr = new pfGroup;
> gr->ref();
> gr->unrefDelete();
>
> It should be something related to unrefDelete() also because when I use
> ref() + pfDelete() it runs ok. Also doing the same but in C version of
> simple sample is ok.
>
> So is it a bug or I'm doing something wrong?
>
> Jaroslav
>
> -----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> -----------------------------------------------------------------------
> Download OpenGL Performer 3.1 Early-Access Alphas:
> ftp://download.sgi.com/pub/access/projects/performer/download/3.1EA/
> -----------------------------------------------------------------------
>

-- 
\_________  \_____  \__    \__  \_____        
\_________  \_____   \__   \__  \_____         Yair Kurzion
       \__     \__   \____\__      \__         yair++at++sgi.com
       \__          \__  \__                  (650) 933-6502
       \__          \__   \__          
       \__          \__    \__             


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Jan 09 2004 - 21:23:25 PST