Artifacts Associated With Ticket 218681
Ticket change [1e6ea7c29c] (rid 90976) by nobody on 2000-10-26 01:04:04:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 1727 Bug Version: 8.0p2 SubmitDate: '1999-04-05' LastModified: '1999-09-16' Severity: MED Status: Released Submitter: pat ChangedBy: hobbs OS: All OSVersion: NA Machine: NA FixedDate: '1999-09-16' FixedInVersion: 8.2 ClosedDate: '2000-10-25' Name: Mark Falco email: [email protected] Support: None Severity: 3 OperatingSystem: Windows NT Synopsis: there is a memory leak when an empty array is created in a procedure ReproducibleScript: proc abc {} { array set tmp {} } while [expr 1] { abc } #watch the memory usage, it skyrockets ObservedBehavior: in normal application this is just a slow memory leak over time DesiredBehavior: no memory leak Patch: here is a tcl script which I'm using to fix the behavior. rename array array_tcl proc array {args} { if {[llength $args] == 3} { if {[lindex $args 0] == {set}} { if {[string trim [lindex $args 2]] == {}} { #avoid a memory leak in Tcl 8.0, when creating empty arrays upvar 1 [lindex $args 1] name if ![info exists name] { set name() {} unset name() } return } } } uplevel 1 array_tcl $args } 8.2 shows no noticable signs of mem leak in this proc. -- 09/16/1999 hobbs
- foundin initialized to: "obsolete: 8.0p2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to:
there is a memory leak when an empty array is created in a p
- type initialized to: "Bug"
Ticket change [9858ff664a] (rid 110587) by welch on 2000-10-26 08:27:10:
- closedate changed to: "2000-10-26T01:27:10"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [cd31fe804d] (rid 95846) by dgp on 2001-04-16 20:28:08:
- subsystem changed to: "07. Variables"
Ticket change [67a5a90af5] (rid 102920) by dgp on 2001-04-16 20:28:09:
- closedate changed to: "2001-04-16T13:28:09"
- closer changed to: "dgp"