[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Memory leak with associative arrays
From: |
Chet Ramey |
Subject: |
Re: Memory leak with associative arrays |
Date: |
Tue, 04 Oct 2011 20:29:07 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 |
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 chet@case.edu http://cnswww.cns.cwru.edu/~chet/
assoc-reassign-memleak.patch
Description: Text Data