Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: bb05c93c5c51331bfd96125d78f299e817d1c474
Ticket: 653511ffffffffffffffffffffffffffffffffff
Deallocate env vars when finalizing
User & Date: mdejong on 2002-12-13 23:25:29
Changes

  1. assignee changed to: "hobbs"
  2. cmimetype changed to: "text/plain"
  3. 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?
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "mdejong"
  9. subsystem changed to: "08. Environment Variables"
  10. title changed to: "Deallocate env vars when finalizing"
  11. type changed to: "Patch"