[osg-users] manual delete object
Robert Osfield
robert.osfield at gmail.com
Mon Jun 1 08:47:36 PDT 2009
On Mon, Jun 1, 2009 at 4:39 PM, Rabbi Robinson <longarch at gmail.com> wrote:
> Hi,
> Thanks, if later I reference the node from a group, will the reference count be increased for the node?
>
> {
> osg::ref_ptr<Node> node = new Node;
> osg::ref_ptr<Group> group = new Group;
> group->addChild(node);
> }
>
> The reference count of node should be one outside the scope. Is it right that somehow group->addChild(node) increases the reference count of node?
I won't answer this directly - an exercise for the reader...
The hint I'll give is that Group uses osg::ref_ptr<osg::Node>
internally so when you add a node it....
More information about the osg-users
mailing list