problem with gc?
zhmt via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed May 27 01:31:41 PDT 2015
@jklp
>
> And also you could try to surround the whole block with
> `GC.disable` and `GC.enable`. This would help to determine if
> the GC is involved:
>
> ---
> Ptr!Conn conn = connect("127.0.0.1",8881);
> GC.disable;
> ubyte[100] buf;
> string str;
> for(int i=0; i<N; i++)
> {
> str = format("%s",i);
> conn.write(cast(ubyte[]) str);
> conn.read(buf[0..str.length]);
> n++;
> }
> GC.enable;
> conn.close();
> ---
I have tried this, and throughput falls down as well too. Does
this mean the gc is not involved? I am confused.
More information about the Digitalmars-d-learn
mailing list