[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Memory leak with associative arrays
From: |
David Parks |
Subject: |
RE: Memory leak with associative arrays |
Date: |
Fri, 14 Oct 2011 16:40:52 -0700 |
Great stuff, amazingly fast - I'm really surprised!
Thanks for that.
Dave
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Chet
Ramey
Sent: Tuesday, October 04, 2011 5:29 PM
To: David Parks
Cc: [email protected]; [email protected]
Subject: Re: Memory leak with associative arrays
On 10/4/11 2:48 PM, David Parks wrote:
> Version: GNU bash, version 4.2.8(1)-release (x86_64-pc-linux-gnu) on
> Ubuntu
> 10.04
>
> If I set an associative array, as in:
>
> MYARRAY["something"]="Goobledygook"
>
> Then I set that same variable name again later (and so on in a loop).
> The earlier variables are never released from memory, before I re-set
> a given item I MUST call unset on the item first, possibly storing the
> value to a temp variable if it's needed (such as is the case with a
> counter, for example).
Thanks for the report. This will be fixed in the next bash release. I've
attached a patch you can use to test.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/