* Torsten Dreyer -- Tuesday 05 May 2009: > I moved the initialization of the aircraft.door object into the > pushback.xml when the dialog is opened.
I assumed that the function should also be accessible via other means than just the dialog (e.g. keyboard bindings). If not, then I absolutely agree with your change. That's the cleanest way. > Is it OK to create a new instance of aircraft.door every > time, the dialog is opened? Yes. (It's generally better to keep class instances, and not to create/destruct them all the time. But in the case of dialogs that's really not an issue, as those are opened very infrequently, so your code is just fine and what I would have written as well.) > Does the old instance gets cleaned up by the garbage collector > after the closure of the dialog or after reopening the dialog? Yes. All local variables in dialog embedded Nasal are put in a separate module, and this is destroyed on closing. The only two things that one has to care for are timer loops and listeners. These should be stopped/removed manually. m. ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel