Andy Ross wrote:

Seriously: the removeChild() method is just buggy.  It should never
have cared about refcounting at all.

Andy, I have to agree with Melchior here. If you call removeChild you have the intention that it will stay in the tree until refcount becomes zero and then it will be deleted. If you call removeChild() and it just detached from the tree (without cleaning it up at some point) you won't even be allowed to access it using the property tree, even after the first call to removeChild().

It's just a matter of properly naming functions anyhow, and therefore the old behavior is available under a different function call: detachChild().

It makes clear to everybody who uses it that it actually detached a node from the tree, but not removes it from memory when calling it. If Nasal relies on that behavior it's just as easy as calling the proper function again and all should be set.

If that's not the case then detachChild() should be modified, but as far as I know it does exactly what you are asking for.

Erik

_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to