new or no?

Andrej Mitrovic andrej.mitrovich at gmail.com
Sun Dec 23 11:47:49 PST 2012


On 12/23/12, Shadow_exe <shadow_exe at ukr.net> wrote:
> for(uint y=0; y<10; ++y){
> 	auto m = new Mutex();
> 	writeln(&m);
> }

Use writeln(cast(void*)m) to get the address of the object, otherwise
you're writing the address of the reference (which each time refers to
a different object).


More information about the Digitalmars-d mailing list