Re: [Flightgear-devel] Valgrind logs

2011-04-15 Thread Andreas Gaeb
Am 14.04.2011 21:39, schrieb Torsten Dreyer: Isn't that what SGReferenced objects were made for? Automatic deletion? Minimal but slight more complex example [...] yes, this works as expected -- as long as one uses SGSharedPtr. The componentForge map uses standard pointers at the moment, so it

Re: [Flightgear-devel] Valgrind logs

2011-04-15 Thread ThorstenB
On 15.04.2011 11:11, Andreas Gaeb wrote: The input value lists seems to fulfil both conditions (SGSharedPtr pointing to SGReferenced), so in theory, automatic deletion should work here. Still, valgrind complains. Could the problem here be related to calling the componentForge functor?

[Flightgear-devel] Valgrind logs

2011-04-14 Thread Andreas Gaeb
Hello everybody, a valgrind log of recent FlightGear is available from http://dl.dropbox.com/u/15761796/valgrind.log (13 MB). A short version containing only the definitely lost backtraces is at http://dl.dropbox.com/u/15761796/definitely_lost.log (59 kB). The largest single entry stems from the

Re: [Flightgear-devel] Valgrind logs

2011-04-14 Thread Torsten Dreyer
Hello everybody, a valgrind log of recent FlightGear is available from http://dl.dropbox.com/u/15761796/valgrind.log (13 MB). A short version containing only the definitely lost backtraces is at http://dl.dropbox.com/u/15761796/definitely_lost.log (59 kB). The largest single entry

Re: [Flightgear-devel] Valgrind logs

2011-04-14 Thread Andreas Gaeb
Am 14.04.2011 16:58, schrieb Torsten Dreyer: Thanks for looking into this. A few comments on the autopilot objects: InputValueLists are vectors of InputValue, a subclass of SGReferenced, so they should be automatically deleted, once the last reference is gone? The componentForge is a

Re: [Flightgear-devel] Valgrind logs

2011-04-14 Thread Torsten Dreyer
This doesn't happen for static variables nor for data members. I'd assume that in case of SGReferenced objects, the same explicit delete is necessary to decrement the reference counter. Isn't that what SGReferenced objects were made for? Automatic deletion? Minimal but slight more complex