memory leaks in phobos?

Andrey vangelisforever at yandex.ru
Thu Apr 11 22:35:59 PDT 2013


On Thursday, 11 April 2013 at 06:39:53 UTC, Traveler wrote:
> On 64 bit may cause crash: arr.length = length, fixed in next 
> version.
>
>>
>>arr.length = 0; // must be deallocation?
>>
> Not necessarily. You can manually do a garbage collection.

The manual calling function GC.collect() has no effect (tested 
under x32 and x64 versions).

<=========>
.......
	clear(arr);
	arr.length = 0;

	GC.collect(); // useless calling, the used memory will be 
increase

	writeln("After dispose. Press a key.");
	stdin.readln();
.......
<=========>



More information about the Digitalmars-d-learn mailing list