Good morning, On Friday, May 25, 2012 19:48:32 Stuart Buchanan wrote: > Thanks for taking a look. > > I think that the SGBuildingBin destructor will be called when I call > the list clear() > method on the SGBuldingBinList (SGBuildingBin.cxx line 654). That in > turn calls clear() I have no current code update, since I am on travel, but I think that the SGBuldingBinList is a list of pointers. Then, on clear of that list, the pointees are not cleared.
Either store the objects itself in the list, which should copy a lot more in the way you do this, or use SGReferenced together with a list of SGSharedPtr values. Just to give two simple solutions. In both of which, the clear can be completely omitted, that happens anyway on the destructor of any stl container. > on the BuildingList (SGBuildingBin.hxx line 105), which is a simple > struct of basic > types, so shouldn't need a destructor. That's right. Mathias ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel