Automatic reference counting

Robert Clipsham robert at octarineparrot.com
Mon Aug 29 04:44:46 PDT 2011


Hey all,

For those of you that doesn't know, Objective-C primarily uses reference 
counting to manage memory. With the latest releases of clang, it also 
supports automatic reference counting, whereby the compiler 
automatically inserts retain/release messages ("calls" if you don't know 
Obj-C) into the code.

There's a complete spec for it at:
http://clang.llvm.org/docs/AutomaticReferenceCounting.html

My main reason for posting is curiosity - how feasible would it be to 
have something like this in D?

There are obviously a few issues that would need looking at, a way of 
marking weak references for example.

-- 
Robert
http://octarineparrot.com/


More information about the Digitalmars-d mailing list