DIP77 - Fix unsafe RC pass by 'ref'

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 11 21:18:54 PDT 2015


On 4/11/15 5:35 AM, matovitch wrote:
> I am not convinced by the dip77, what about raii managed classes with
> costly opAssign operator (like in w0rn example) ? The goal of passing an
> object by reference is to avoid the copy and here you guess the
> parameter is ref-counted and made a (pseudo-)copy ? Then any allocating
> opAssign should be marked @system ?

Expensive opAssign or expensive postblit? -- Andrei


More information about the Digitalmars-d mailing list