On Tue, 13 Jul 2010 02:44:49 +0300, ABothe <[email protected]> wrote:

Hi everyone,

I don't know if it's a bug or not .. but D or at least its GC doesn't want to free my allocated stuff! Also when I 'disable' the GC via GC.disable(); it won't free it :-/

Alex, please have a look at the module I posted to D.announce. It allows working with unmanaged memory without having to worry about manual deallocation, etc.

For example:

import std.stdio;
import std.gc;
import data;

void main()
{
        Data d = new Data(50_000_000);
        readln(); // check my memory usage now
        d = null;
        fullCollect();
        readln(); // check my memory usage now
}

You can get my module from here: http://github.com/CyberShadow/data.d

--
Best regards,
 Vladimir                            mailto:[email protected]

Reply via email to