draft proposal for ref counting in D

Walter Bright newshound2 at digitalmars.com
Wed Oct 9 19:19:17 PDT 2013


Rainer Schuetze wrote:

On 28.06.2013 21:50, Walter Bright wrote:
 > The main problem with this is the decay of a shared_ptr!C to a C. Once
 > that happens, all the memory safety goes out the window.

By "decay", do mean the lowering or something else?

There is no stray C reference in user code, it always gets lowered to 
shared_ptr!C. Only @trusted code in shared_ptr will have to deal with "raw" 
references. It is shared_ptr's responsibilty to maintain memory safety, just the 
same as for AddRef and Release.



More information about the Digitalmars-d mailing list