Thread overview
GC.collect() and GC.minimize() not releasing memory
Dec 23, 2010
%u
Dec 24, 2010
torhu
Jan 08, 2011
Stewart Gordon
Jan 08, 2011
Simen kjaeraas
Jan 08, 2011
Walter Bright
Jan 08, 2011
Simen kjaeraas
December 23, 2010
Hi,

I'm running this piece of code, but the memory isn't getting freed (as judging
from Task Manager). It doesn't help if I call collect() and minimize() in a
loop... is something wrong? Or is Task Manager not a reliable indicator of this?

Thank you!


import std.stdio;
import core.memory;
import core.thread;

void writelnflush(T...)(T args) { writeln(args); stdout.flush(); }
void allocate() { new byte[1024 * 1024 * 64]; }

void main()
{
	writelnflush("Sleeping (check the memory usage!)...");
	Thread.sleep(4 * 10000000);
	writelnflush("Allocating...");
	allocate();
	writelnflush("Collecting...");
	GC.collect();
	GC.minimize();
	writelnflush("Sleeping (check the memory usage!)...");
	Thread.sleep(4 * 10000000);
}
December 24, 2010
This newsgroup is just for automated use by Bugzilla.  You should post to d.D or d.learn instead.  Or use the Bugzilla at http://d.puremagic.com/issues/ (search before posting a new issue).
January 08, 2011
On 24/12/2010 06:13, torhu wrote:
> This newsgroup is just for automated use by Bugzilla.
<snip>

Where is the official statement of this?

Stewart.
January 08, 2011
Stewart Gordon <smjg_1998@yahoo.com> wrote:

> On 24/12/2010 06:13, torhu wrote:
>> This newsgroup is just for automated use by Bugzilla.
> <snip>
>
> Where is the official statement of this?

Likely there is no hard official statement. However,
http://www.digitalmars.com/NewsGroup.html states that it is for "Bug
reports for D compiler and library". Those use Bugzilla for bug reports,
and free-floating posts in the newsgroup are not tracked like those in
Bugzilla, giving them a lot less value.

-- 
Simen
January 08, 2011
Simen kjaeraas wrote:
> Stewart Gordon <smjg_1998@yahoo.com> wrote:
> 
>> On 24/12/2010 06:13, torhu wrote:
>>> This newsgroup is just for automated use by Bugzilla.
>> <snip>
>>
>> Where is the official statement of this?
> 
> Likely there is no hard official statement. However,
> http://www.digitalmars.com/NewsGroup.html states that it is for "Bug
> reports for D compiler and library". Those use Bugzilla for bug reports,
> and free-floating posts in the newsgroup are not tracked like those in
> Bugzilla, giving them a lot less value.
> 

That's right. It's just not useful to post free floating posts here. Bug reports should go in bugzilla.
January 08, 2011
 Walter Bright <newshound2@digitalmars.com> wrote:

> Simen kjaeraas wrote:
>> Stewart Gordon <smjg_1998@yahoo.com> wrote:
>>
>>> On 24/12/2010 06:13, torhu wrote:
>>>> This newsgroup is just for automated use by Bugzilla.
>>> <snip>
>>>
>>> Where is the official statement of this?
>>  Likely there is no hard official statement. However,
>> http://www.digitalmars.com/NewsGroup.html states that it is for "Bug
>> reports for D compiler and library". Those use Bugzilla for bug reports,
>> and free-floating posts in the newsgroup are not tracked like those in
>> Bugzilla, giving them a lot less value.
>>
>
> That's right. It's just not useful to post free floating posts here. Bug reports should go in bugzilla.

And right there is your official statement^ :p

-- 
Simen