On 5/06/10 2:18 , Gianni Ambrosio wrote:
> Is it true that if I declare a pointer as follows:
> 
> osg::Group* test = new osg::Group;
> 
> I would have a memory leak since I can not call a delete on "test"
> object pointer?

As already said, yes you could have a memory leak.
What could also happen is that if you assign this to a ref_ptr (eg, by using 
addChild,
setSceneData, etc) *but* keep the raw pointer around as well you could end up 
with an
invalid pointer when the object was deleted by unreferencing.

/ulrich
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to