I have a scenegraph that I have constructed that I would like to delete after I am done with it. What is the recommended way to do this?

So for example I have a root node:

osg::NodePtr  rootNode = osg::Node::create();

... Add a bunch more nodes ...

Then I would like to issue a command here on the rootNode to delete the tree.

My first thought was that reference counting should handle this similar to how smart pointers work. So I thought maybe:

rootNode.settNull()

or

rootNode = NullFC

But the implementation of those methods in FieldContainerPtrBase doesn't seem to have any code for decreasing the reference count.

So I need to explicitly call subRef(rootNode) to make this work?

Thanks for your help.

-Allen



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to