Overview
| Artifact ID: | f962350dc13a013e367d6c101f2719dcb22a90ff |
|---|---|
| Ticket: | 467523ffffffffffffffffffffffffffffffffff
memory leak in [namespace eval foo {}] |
| User & Date: | msofer on 2001-10-11 20:13:14 |
Changes
- icomment:
Logged In: YES user_id=148712 I do think I have a correct patch now - the special handling of self-referencing bytecodes in TclreleaseLiteral (tclLiteral.c) was being done too early (entryPtr->refCount == 2 at function entry) and removing two global table references in one go (setting entryPtr->refCount to 0) while decreasing the object's corresponding refCount by just one. My earlier patch corrected this by removing a reference to the object too - as Ronnie discovered, in some situations this caused the object to be accessed after it was removed. This patch restores "normal handling": each call to TclReleaseLiteral removes at most one reference in the global table, and the special code for self-referencing bytecodes is only used at the last pass.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"