Overview
| Artifact ID: | bb05c93c5c51331bfd96125d78f299e817d1c474 |
|---|---|
| Ticket: | 653511ffffffffffffffffffffffffffffffffff
Deallocate env vars when finalizing |
| User & Date: | mdejong on 2002-12-13 23:25:29 |
Changes
- assignee changed to: "hobbs"
- cmimetype changed to: "text/plain"
- comment changed to:
Here is a patch that calls ckfree() in TclFinalizeEnvironment for env vars that Tcl has allocated. I ran into this while trying to plug memory leaks in the core so that I could figure out if my extension was leaking memory. This patch will also reset the original environ pointer in TclFinalizeEnvironment. While this fixes the memory leak, I wanted someone else to review it to so they could look at the environ string issue with a fresh eye. My question is, should Tcl reset the original state after it is unloaded or should it leave the possibly modified env array the way it was and leak this memory? If leaking memory is the way to go, would it make sense to allocate them with malloc so that they do not show up as leaked memory with TCL_MEM_DEBUG?
- foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "mdejong"
- subsystem changed to: "08. Environment Variables"
- title changed to: "Deallocate env vars when finalizing"
- type changed to: "Patch"