move object from heap to stack

Namespace rswhite4 at googlemail.com
Wed Sep 19 06:45:21 PDT 2012


On Wednesday, 19 September 2012 at 13:32:42 UTC, Namespace wrote:
> Is that possible?
> I can initialize an object with scope or, in feature, with 
> scoped, directly on the stack but is it also possible to move 
> an existing object from the heap to the stack?

I tried this:
http://dpaste.dzfl.pl/2955ff41
But as you can see in line 25/26, after I destroyed the heap 
object, the stack object seems to be corrupted.


More information about the Digitalmars-d-learn mailing list