Skip to content
Tcl Source Code History Of Ticket 1049909
Login

History Of Ticket 1049909

Artifacts Associated With Ticket 1049909

  1. Ticket change [d6999ac188] (rid 123834) by jslisong on 2004-10-19 09:50:25:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      sorry my poor english.
      
      but i think that follow funtion in tclobj.c need to add 
      some code to avoid memory leak.
      
      void
      TclFinalizeCompExecEnv()
      {
          register Tcl_Obj  *objPtr;
      
          Tcl_MutexLock(&tableMutex);
          if (typeTableInitialized) {
              Tcl_DeleteHashTable(&typeTable);
              typeTableInitialized = 0;
          }
          Tcl_MutexUnlock(&tableMutex);
          Tcl_MutexLock(&tclObjMutex);
      
      //{ lisong 2004-10-19
      // add to fix memory leak of objptr
      while (tclFreeObjList != NULL)
      {
      objPtr = tclFreeObjList;
      tclFreeObjList = objPtr-
      >internalRep.otherValuePtr;
      }
      free(objPtr);
      //}lisong
      
          Tcl_MutexUnlock(&tclObjMutex);
      
          TclFinalizeCompilation();
          TclFinalizeExecution();
      }
      
    4. foundin initialized to: "obsolete: 8.4.7"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "jslisong"
    9. subsystem initialized to: "10. Objects"
    10. title initialized to: "Obj Memory Leak"
    11. type initialized to: "Bug"
  2. Ticket change [d16d7d1faa] (rid 113344) by msofer on 2004-10-19 17:06:24:

    1. closedate changed to: "2004-10-19T10:06:24"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      
      No. The Tcl_Obj are allocated in a pool, you cannot free
      them independently (except if tcl was compiled with
      -DPURIFY, in which case there is not tclFreeObjList, and the
      core handles the freeing already).
      
      The free objects are not properly freed by tcl. They are
      kept around for reuse, and tcl relies on the OS to release
      the memory at exit. See the comments in the function
      TclAllocateFreeObjects(), in generic/tclObj.c
      
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "msofer"