Best properly way to destroy a 2 dimensional array?
Jonathan Villa via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Apr 7 09:09:17 PDT 2016
On Thursday, 7 April 2016 at 10:05:02 UTC, Andrea Fontana wrote:
> On Thursday, 7 April 2016 at 10:02:05 UTC, Andrea Fontana wrote:
>> On Wednesday, 6 April 2016 at 20:30:33 UTC, Jonathan Villa
>> wrote:
>>
>> Anything change if you wrap your code like:
>>
>>
>> while ...
>> {
>> ...
>> {
>> ubyte[][] ...
>> ...
>> }
>>
>> GC.collect();
>> GC.minimieze();
>> }
>>
>> ?
>
> Or maybe you could try to do:
>
> combs = null;
>
> before collecting.
Yep, I enclosed the ubyte[][] allocation in a new scope, like our
friend Alex suggested, but nothing seems to change. I'm going to
try combs = null...
Big news, I've tested my code using Debian x64 8.2 and it really
frees memory! even without adding `combs = null` (I'm going to
add it anyway just in case).
So, looks like is some kind of Windows plataform problem. Next
time I boot on Windows I'm going to add the null assignment and
hope for results.
Regards!
More information about the Digitalmars-d-learn
mailing list