[osg-users] Deleting osg::Image that is shallow copied

Pierre-Jean Petitprez pierre-jean.petitprez at inria.fr
Tue Aug 16 02:27:20 PDT 2016


Hi,

In my application I have two osg::Images, the second one is a shallow copy of the first one thanks to the copy constructor.
Is it safe to delete the first image and keep only the second one, or should I use deep copy instead? 
My tests showed me that the data is still reachable but when looking at the image destructor it clearly deallocates the data.

Thanks for enlightening me,

Cheers,
Pierre-Jean

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68380#68380








More information about the osg-users mailing list