I take it that a "leak" is a ref from somewhere else than the stack.
That might be a reasonable definition. It's fairly important that if one passes the local object to a function, that should count as a "leak" only if the called function (or some function it calls in turn) stores a reference somewhere where it might live longer than the function call.
/ Niels Möller (vässar rödpennan)
Previous text:
2004-02-05 15:01: Subject: Re: Default backend and thread backends?
I take it that a "leak" is a ref from somewhere else than the stack.
It could be made transitive too - a ref from another object without that bit set isn't a leak either. But otoh you'd have to set the bit recursively in that case.
This can only be applied to thread local data, but in that case I think normal refcounting still is fine: It preserves the semantics and it's not necessary to do it atomically.
/ Martin Stjernholm, Roxen IS