Re: [osg-users] Deleting still referenced object

2019-01-14 Thread Richard Harrison
Thanks Robert and Laurens for your responses. It all makes a lot of sense and it is the solution that I was looking for all along but failed to find because I didn't look hard enough even though I should have been able to figure it out - so thanks for the guidance. Most of my effort went into

Re: [osg-users] Deleting still referenced object

2019-01-14 Thread Robert Osfield
Thanks for chipping in Laurens. I have just had a look at simgear and the DefaultCachePolicy::find(const string& fileName, const Options* opt) that calls registry->getFromObjectCache(fileName) is definitely problematic. the getFromObjectCache() method only passes back a C pointer, not a

Re: [osg-users] Deleting still referenced object

2019-01-14 Thread Voerman, L.
Hi Richard, sorry to drop into the discussion so late, I think the problem is that you should call getRefFromObjectCache instead of getFromObjectCache available in osg versions above 3.3.4, this should close the gap where the refCount can touch zero. >From your stack trace the call seems to come