* Csaba Halász -- Tuesday 09 December 2008: > var n = props.globals.getNode("/sim/paths/validate", 1).remove();
> Okay, that must be some magic from Melchior again :) :-P > it creates the node and immediately removes it. So how does > the code in fgValidatePath trigger the listener? remove() does only remove the node from the main tree, but deosn't remove it from memory as long as there are references held to it. Only destroying the last SGPropertyNode_ptr would actually destroy the node. The validation interface has one reference since long before the Nasal code is even run (Main/util.cxx). The Nasal code above also gets a reference (returned by move() itself). util.cxx:fgValidatePath and the io code can now safely communicate via this detached Node -- but it's no longer reachable for others. Even if you created a new node under this name, it would be a different node and not influence the validation process. m. ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel