Scott A. Friedman (friedman++at++ucla.edu)
Tue, 20 Apr 1999 16:33:54 -0700
Might try calling fltFreeSharedPalette( fltGetCurSharedPalette( ) ) after
you finish loading something -- then do a pfdMakeSharedScene( ) -- this
might be a problem if you are paging stuff -- but then you probably do not
want to be paging multigen files anyway.
If you are using Performer's nice sharing mechanism you probably should also
periodically call pfdCleanShare( pfdGetGlobalShare( ) ) -- or with whatever
pfdShare you are using. This is where I have experience most headaches.
This guy will not remove the item (e.g. texture) from the share structure
until the reference count drops to one where it then removes it and deletes
it for you. This means that once it is in the share for the scene calling
pfdCleanShare is the *only* way to get rid of it correctly. Unless, of
course, you write your own pfdCleanShare() ;-) It can be confusing if you
are tracking sharable things in your own non performer data structures with
reference counts.
I tend to call it every once in a while after pfBuffer::merge
Scott Friedman
UCLA
----- Original Message -----
From: Mason D. Menninger <mason++at++praxis.jsc.nasa.gov>
To: <Veraart++at++fel.tno.nl>; <info-performer++at++sgi.com>;
<mason++at++praxis.jsc.nasa.gov>
Sent: Tuesday, April 20, 1999 11:54 AM
Subject: Re: The infamous dbase paging memory leak
>
>
> Okay, I think we are getting somewhere now. The man page
> for "fltSharedPalette" states:
>
> Since the loader owns the shared palette resources, via
> pfRef, these resources will persist even after the
> associated database has been deleted. Therefore the loader
> provides a function to disown and/or deallocate the shared
> palette, when using the loader as part of a database paging
> facility.
>
> So here's the question: Even if I am clever enough to get
> a pointer to a fltSharedObj that was created with the
> OpenFlight loader, how do I use fltFreeSharedObj() within
> the dbase process without the same catastrophic results
> as using pfDelete() in the dbase process? Is there a
> "fltAsyncFreeSharedObj"?
>
> The final note of the man page says:
>
> fltSharedPalette will be more fully documented in a future
> release.
>
> Any ambitious writers from MultiGen want to take a crack at it?
>
>
> -Mason
> mason++at++praxis.jsc.nasa.gov
>
>
> > I think the flight loader performs a pfRef() call to every texture and
> > Geostate that it creates. This makes it impossible for pfXXDelete() to
> > remove them from memory.
> > See man page for 'fltSharedPalette'. One of the Multigen Flight Loader
> > pages.
> >
> > Mario
>
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Tue Apr 20 1999 - 16:33:36 PDT