Re: [Flightgear-devel] Random Buildings - memory consumption
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
[Flightgear-devel] FlightGear developers discussions flightgear-devel@lists.sourceforge.net
Done. Could do with some more refinement, but it works. If you input speed-kt, then position updates are ignored and positions are calculated from input speed and pitch. Here are the patches: http://dl.dropbox.com/u/57645542/0001-SG%20Make-Models-move-with-heading-and -speed.patch http://dl.dropbox.com/u/57645542/0001-FG-Make-models-move-with-heading-and-s peed.patch http://dl.dropbox.com/u/57645542/0002-FG-Calculate-horizontal-and-vertical-s peeds.patch Next, I'm going to allow input of vertical and horizontal speeds (fps) as well. Seems to have very little impact on framerate, but it involves a for loop (and you know how much I like those), so there are limits. Great - thanks! I'm travelling at the moment, so I won't be able to look into this until a week from now, but I'll test this as soon as I am back. We won't need it for many clouds (usually less than 10, for pure Cirrus skies still less than 50), so I don't see any large number coming up (of course there may be non-weather applications...) * Thorsten -- 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