Gerrit Voss wrote: > Hi, > > On Tue, 2007-03-27 at 16:18 -0500, Allen Bierbaum wrote: >> Gerrit Voss wrote: >>> Hi, >>> >>> On Sun, 2007-03-25 at 09:18 -0500, Allen Bierbaum wrote: >>> >>>> Andreas Zieringer wrote: >>>> >>>>> Hi Allen, >>>>> >>>>> >>>>> >>>>>> I have been trying to track down some memory leaks in my application >>>>>> today and I noticed that the _changedStore and _createdStore vectors in >>>>>> OSG::ChangeList seem to grow without bound in all the current sample >>>>>> applications and tutorials. It looks like there is no where in the >>>>>> system that ever calls clear (or commitChangesAndClear or ...) to >>>>>> actually apply and clear the change lists. >>>>>> >>>>>> I know I don't understand the change list code very well, but this seems >>>>>> like a "bad thing". >>>>>> >>> just a short question to clarify things before I start chasing this >>> down : >>> >>> if you say 'in all app/tutorials' are they growing while you create new >>> elements or are they growing while you are just rendering without any >>> change to the scene graph ? >>> >> No, you have to make changes for them to grow. In the case of the >> tutorials, I *think* there would be a change per frame setting a >> transform matrix for the ssm, but I could be wrong there. > > but that should not make the changelist grow even if you do not > clear/commit it every frame. I added some simple changelist statistics > to the SSM, and for me, so far, for the apps/tuts I tried the changelist > size does not change. I'll try more and see if I find one where it > breaks down. > >>> most of the apps/tutorials just load a model and render it so having a >>> growth especially in _createdStore looks strange. Or did you add own >>> code which create containers on the fly ? >>> >>> >> I think it is for any change of any existing container as well. >> Basically anything that queues up a change in the change list because as >> far as I can tell, it is never cleared. > > kind of, but there should be an upper limit as the containers will use > the same change entry over and over again (if you don't clear). So if > any of your stores inside the changelist is bigger than the number of > fieldcontainers inside your application (counting everything, including > the prototypes and already deleted containers) something is really > wrong. But I haven't seen this happen so far. > > If it just grows with the creation of new containers that is intended > and can only be avoided by clearing the changelist.
This is probably what was hitting us then. I know in our main application we are constantly creating and destroying fc's. Once I saw the list growing I did not look into this too much further. Thank you for taking a look and adding statistics, that should help out future users quite a bit. -Allen > > regards, > gerrit > > > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
