memory releasing problem by addchild and removechild
I have read some posts about memory releasing problem by addchild and removechild.
Here is my situation ,we developed osg app by qt in win7, we use class ViewerWidget to adding our viewer as a qt widget.
We did a test to simply adding 50000 osg::Node to a osg::Group then removing all nodes and the group.After
first adding ,it increase about 4000K memory ,I think it is the proper storage of 50000 osg::Node,then by
the first removing,it only decrease 400K。Then by another 50000 adding ,it only increase 400K instead
4000K,if we removing all nodes again ,it still decrease 400K.
No matter how many time we tried to adding or remove nodes ,if we keep the max test node to 50000,It always hold
the 4000K memory even we remove all nodes.
It looks like osg still hold the first 50000 osg::Node as a Cache ，not releasing it immediately。
But I must admit ,it do releasing the memory properly in osgViewer or other osg examples by the same test!
We use win7 ,osg2.9.16 ,osg3.2.0,we observe memory change by windows resource management.
Read this topic online here: