I want my Memory back ;-)

Vladimir Panteleev vladimir at thecybershadow.net
Wed Jul 14 22:39:18 PDT 2010


On Tue, 13 Jul 2010 02:44:49 +0300, ABothe <info at alexanderbothe.com> 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:vladimir at thecybershadow.net


More information about the Digitalmars-d mailing list