To be more detailed:

I'd expected that the code with 'getA' without ref

[code]
        A getA() {
                writeln("Return A");
                return this._a;
        }
[/code]

would print this output:

----
CTor 42
opAssign R 42
DTor 42
Return A
Postblit 42
opAssign R 84
DTor 84
DTor 42
----

And with 'getA' with ref

[code]
        ref A getA() {
                writeln("Return A");
                return this._a;
        }
[/code]

would print this output:

----
CTor 42
opAssign R 42
DTor 42
Return A
opAssign L 42
DTor 42
DTor 42
----

Reply via email to