On 2/27/15 7:52 AM, Manu via Digitalmars-d wrote:
Can I call opAddRef/opRelease from within the postblit/destructor
manually and expect the compiler to elide calls correctly?
That doesn't seem foolproof though, and you also said manual calls are
not @safe. Why not specify a call sequence?

Ah, I think you mean structs that have a class member? The compiler will insert opAddRef and opRelease appropriately:

=========
* struct, class, and closure types that have RCO members accommodate calls to opRelease during their destruction.
=========


Andrei

Reply via email to