<div dir="ltr"><div><div>I tried removing the children with m_rootNode->removeChildren(0, m_rootNode->getNumChildren());<br></div>but this results in some memory being still allocated.<br><br></div>After that, I move the mouse around a bit in the clean scene, and the memory starts being freed. However, It never gets to the initial value, there is always some memory floating around.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-13 15:16 GMT+01:00 Alberto Luaces <span dir="ltr"><<a href="mailto:aluaces@udc.es" target="_blank">aluaces@udc.es</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Bruno,<br>
<br>
if you read the source code, you will see that the LOD uses the same<br>
scheme for storing nodes as a Group: just a vector of ref_ptr that will<br>
be unallocated when destroyed.<br>
<br>
Maybe you can place some breakpoints at the destructors on the debugger<br>
and see what is happening.<br>
<span class="im HOEnZb"><br>
Bruno Oliveira writes:<br>
<br>
> Thank you for your answer. However, since I'm using a LOD, I think it<br>
> is not properly removing my data. At least the memory is still<br>
> allocated.<br>
> If I manually iterate over all nodes and delete them by myself, some<br>
> memory is freed, but not all!<br>
><br>
> 2016-05-13 14:58 GMT+01:00 Alberto Luaces<br>
><br>
><br>
</span><div class="HOEnZb"><div class="h5">>     Bruno Oliveira writes:<br>
><br>
>     > At some point I want to completely wipe out my scene. How can I<br>
>     delete<br>
>     > all nodes?<br>
><br>
>     If you want to wipe a node and all its descendants, just delete<br>
>     the<br>
>     parent node. That is what reference counting is all about.<br>
<br>
--<br>
Alberto<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</div></div></blockquote></div><br></div>