First off, I want to say that I don't want to put David's work down. This *is* a complicated matter, and *much* work went into it, and the feature works very well (when it works) and I enjoy it a lot. It's really only the crashes that are annoying, and the fact that we are living with them a really long time now. Reworking the critical and obviously buggy list handling would probably be a good idea.
* Frederic Bouvier -- Wednesday 19 April 2006 10:44: > So why not using a single list and a state variable in the plane record ? I would say that tracking the state in the plane record is a must. There's really no other place where this belongs. Using just one list is an option. We don't have *that* many aircraft around. The highest number that I ever saw were ~75 aircraft, but most of the time it's around 30. Going through one list with 70 items and checking one state variable is hardly a performance factor. But I wouldn't even object to separate containers. I would just use queues and always pop an item for inspection, then either drop it and remove the plane record, or push it onto a queue again -- the same queue, or a different (changing the ac state in the plane record accordingly). Currently some places erase(), others pop(), many many times iterators are set to the list begin() (75 times :-), and it's a bit hard to follow what's going on. No wonder one and the same aircraft ends up on 5 state lists at the same time. > BTW: I don't think using a smart memory management technique should be ignored > just because this particular problem is fixed ( in a near future I hope ). Sure. But they shouldn't be used to hide bugs that needed to be fixed in the first place. m. ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel