draft proposal for ref counting in D
Walter Bright
newshound2 at digitalmars.com
Wed Oct 9 17:04:41 PDT 2013
If autoreleasepull is just a handy way to lump together Release() calls, then
that is quite unnecessary if the compiler inserts calls to Release()
automatically. If it is, instead, a promise that members of autoreleasepull do
not leak references outside of that object, then this is very problematic for D
to guarantee such - and guarantee it it must. I.e. it's "escape analysis" in
another disguise.
I think the compiler should pick where to put the Release() calls, that is the
whole point of ARC. If the compiler can do sufficient escape analysis to
determine that the calls can be elided, so much the better.
More information about the Digitalmars-d
mailing list