DIP74: Reference Counted Class Objects

Matthias Bentrup via Digitalmars-d digitalmars-d at puremagic.com
Fri Feb 27 12:58:26 PST 2015


When a function makes/destroys multiple references to an object 
it should always be safe to coalesce all AddRefs into the first 
AddRef and all Releases to into the last Release call.

This could be a small performance win, but opAddRef/opRelease 
would need the count as argument or maybe as template parameter.


More information about the Digitalmars-d mailing list