[osg-users] Deleting still referenced object
Richard Harrison
rjh at zaretto.com
Mon Jan 14 16:09:40 PST 2019
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 identifying the problem; the fix
was only a few hours.
I've just changed simgear (again thanks for the code, that really
illustrated it well) and I'm currently flying one of my long test routes.
> I will add a comment to the ObjectCache about getFromObjectCache()
good idea; that would have helped me; possibly even I could have tracked
down the problem myself.
> I would also recommend changing instances of
> readNodeFile/readImageFile/readObjectFile() to readRefNodeFile() etc.
I've just had a quick search through OSG and these are the methods that
I've found that I'll change if we're using them to be the ref versions.
We've still got a few multithreading related problems to find and these
may help.
readRefHeightFieldFile
readRefImageFile
readRefNodeFile
readRefNodeFiles
readRefObjectFile
readRefScriptFile
readRefShaderFile
Is there any other documentation of things that are deprecated?
> All these Ref version for file loading and cache came in existence to
> address threading issues. In hindsight the OSG should never have
> provided the non ref_ptr<> versions.
That's often the way; and hindsight is a truly wonderful thing.
More information about the osg-users
mailing list