Hi Amujika,

There is what reference counting is for - to automatically manage
memory like this.  You don't really provide enough information about
how you are defining and using this m_geom pointer so we can only
guess at what the problem might be.  If you aren't using ref_ptr<> for
m_geom you certainly should be.

Robert.

On Fri, May 29, 2009 at 9:43 AM, Andoni Mujika <[email protected]> wrote:
> Hi,
>
> In my programm I have this line inside the viewer's loop:
>
> m_geom = (osg::Vec3Array*) ((dynamic_cast<osg::Vec3Array*>
> (m_NewGeom)->clone(osg::CopyOp::DEEP_COPY_ARRAYS)));
>
> The memory used increases untill the programm fails. I tried delete m_geom,
> m_geom->clear() and m_geom->erase but it didn't work.
>
> How can I release this memory?
>
> Thanks,
>
> Amujika
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to