From: Michael R. <mic...@gm...> - 2009-03-31 08:53:55
|
Hi all, 1.) I'm using OpenSG on Windows. 2.) FCFactory registry might be the problem. I've attached a sample application, in which i create und destroy a set of dummy objects each containing 3 nodes, 1 transform core and 2 group cores. For a set size of 50000 dummy objects, i can discover leaks of approx. 3MBs after unloading the objects. Does this size sound reasonable for you? many thanks, Michael -------- Original-Nachricht -------- > Datum: Fri, 27 Mar 2009 10:56:25 -0500 > Von: Dirk Reiners <dir...@gm...> > An: ope...@li... > Betreff: Re: [Opensg-users] memory leaks? > > Hi Michael, > > Michael Raab wrote: > > Hi all, > > > > i'm using openSG 1.8 as basis for our vr application. When loading and > > unloading our scenarios i discovered some memory leaks. Searching in my > > source code helped not to close them. I wrote a small test benchmark in > which > > i create 50000 objects where each object creates 3 opensg nodes, 1 > transform > > core and 2 groups. After destroying my 50000 objects, the opensg nodes > and > > cores are successfully destroyed, if i can trust the fc statistics > > (http://opensg.vrsource.org/trac/wiki/Tutorial/OpenSG1/Memleak). So are > there > > any known memory leaks that are caused by opensg? > > First: how big is the memleak? But a few KB or does grow without bound? > > In general OpenSG 1 handles cleanup reasonably well, as long as you use > RefPtrs > or manage the refcount yourself. > > I see two possibilities: > > - ChangeList is not cleared. If you set it to read/write at the beginning > of the > program you need to clear it occasionally or it will grow without bounds. > - FCFactory registry. The FCFactory keeps a registry, a simple vector, for > all > created FCs, which doesn't shrink when objects are deleted (to make sure > IDs are > unique). If you create this many objects regularly even a few bytes in > that > vector can add up. > > Are you on Linux or Windows? If Linux I recommend running it through > valgrind, > which pretty reliably will find mem leaks. I don't know any equivalent > tools on > Windows though. > > Can you send us your test program? We can give it a look and see if there > is > something unusual. > > Yours > > Dirk > > ------------------------------------------------------------------------------ > _______________________________________________ > Opensg-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opensg-users -- Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a |