Andy Ross wrote:

If you guys need or want a bit that says "leave in tree until
condition X has occurred", then that's fine.  But you can't use the
refcount to do it, that's not what it's for.

Reference counting is used to make sure that (a) memory is never freed
when there are live pointers to it, and (b) live pointers never point
to freed memory.  Any other usage* is just wrong, and causes bugs**.

* In this case: using the reference count to tell whether or not the
  node is "in the tree" or "detached".

I'll have to take a look at the code to make sure, but as far as I know this is exactly what is happening. You don't have to be pedantic, I know what it's meant for; Counting the number of references, and only act when the counter reaches zero. That is what the current code should do or am I missing something here? I'll take a look at it.

Erik

_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to