On 05/23/13 11:47, Namespace wrote: > I get this output: > > ==== > > ---- > CTor 42 > DTor 0 > Return A > Postblit 42 > ---- > DTor 84 > DTor 42 > > ==== > > with the following code. I'm a bit confused about the Postblit. I return by > ref so I thought that I get a const ref of the original A.
> ref const(A) getA() const {
> writeln("Return A");
> return this._a;
> }
> A a = b.getA();
You do, but you then assign to another 'A'...
artur
