Returning dynamic array from the function

m0rph m0rph.mailbox at gmail.com
Wed Oct 17 12:48:02 PDT 2012


> b1 points to the exact same data as does a1. This data is stack-
> allocated, and thus a2 points to an overwritten stack frame.

Thanks for explanation, I thought contetns of a1 are copied to 
the heap when assignment operator executed.


More information about the Digitalmars-d-learn mailing list