On 1 Dec 2008, at 14:50, Matthew Gregory wrote:

> You could use "delete this.array" to free the memory instantly, it is
> much slower than assigning it to null and waiting for the GC though.
>
I didn't know delete but if it is slower ... I won't use it (except in  
some particular case maybe). It is not that I'm in a hurry to recover  
memory, I just want to make sure my app won't leak.

So, what should I do ? Is it enough to assign the array to null or  
should I browse the array for each element to be set to null (that  
extra loop take time too) ?

> Jean-Baptiste BRIAUD -- Novlog wrote:
>> Hi,
>>
>> I'm using at several places what I called an associative array :
>> this.array[key] = value;
>>
>> I would like to be sure I release memory used by the array. Would you
>> advice me to rely on garbage collector or should I do something
>> special ?
>>
>> Various solution :
>> 1. this.array = null; // Is is enought ?
>> 2. Browse the array and apply for each member array[i] = null; then  
>> do
>> 1.
>> 3. Something else ?
>>
>> Thanks !
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's  
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win  
>> great prizes
>> Grand prize is a trip for two to an Open Source event anywhere in  
>> the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's  
> challenge
> Build the coolest Linux based applications with Moblin SDK & win  
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in  
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to