Hi Austin,

Austin wrote:
> Okay, cool.
> 
> I'm doing this to monitor memory management.
> The code I first wrote just sits inside of a loop. I load the model, let 
> it sit there for a second, then unload it. I repeat this infinitely. In 
> looking at the memory usage of the application, it slowly climbs after 
> every iteration of the loop. If I comment out the loading and unloading 
> commands, the memory usage is stable and does not rise.
> 
> Is subChild supposed to clean up entirely or do I have to do something 
> else to keep things stable?

No, it should clean up nicely.

There are two reasons for the behavior you're seeing:

1. There is a global vector to map IDs to FieldContainers, which right now 
never 
shrinks. Depending on the number of nodes in your file, that might make for a 
fairly slow memory creep. We have not found anybody having a real problem with 
this, except for showing up in artificial memory tests. ;)

2. If you turned on writing ChangeLists, those keep track of all changes and 
need to be cleared if the changes are not used. Call 
OSG::Thread::getCurrentChangeList()->clearAll(); in the loop and see if that 
makes a difference.

Hope it helps

        Dirk


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to