Skip to content
Tcl Source Code History Of Ticket 1081975fffffffffffffffffffffffffffffffff
Login

History Of Ticket 1081975fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1081975fffffffffffffffffffffffffffffffff

  1. Ticket change [71dd70d19d] (rid 100757) by hungtv on 2004-12-09 10:07:32:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      I follow code to create and delete Tcl Interp. 
      
      m_pInterp = Tcl_CreateInterp();
      if (!Tcl_InterpDeleted(m_pInterp)) {
           Tcl_DeleteInterp(m_pInterp);
           Tcl_Finalize();
      }
      
      Is it right? It alway cause memory leaks.
      
    4. foundin initialized to: "obsolete: 8.4.9"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "hungtv"
    9. subsystem initialized to: "41. Memory Allocation"
    10. title initialized to: "Memory leaks 2400 bytes long."
    11. type initialized to: "Bug"
  2. Ticket change [3abd2965d1] (rid 112611) by dgp on 2004-12-09 23:10:07:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2004-12-09T16:10:07"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      If you place that code in a loop,
      do you see memory usage grow?
      
      Or is this just a one-time "leak" ?
      
      A "leak" of 2400 bytes looks like
      the tclFreeObjList which isn't
      released until process exit.
      
      You can build Tcl with -DPURIFY
      to avoid that issue, and to get
      leak detection tools like Purify
      to not falsely complain.
      
      If a -DPURIFY build still shows
      trouble, or you see continued
      growth in a loop, comment again
      here to keep this report from closing.
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Invalid"
    8. status changed to: "Pending"
    9. username: "dgp"
  3. Ticket change [82da9461e9] (rid 117298) by nobody on 2004-12-10 08:56:46:

    1. icomment:
      Logged In: NO 
      
      Memory usage grow.
      
      for(int i=0; i<5; i++)
      {
          m_pInterp = Tcl_CreateInterp();
          if (!Tcl_InterpDeleted(m_pInterp)) 
          {
             Tcl_DeleteInterp(m_pInterp);
             Tcl_Finalize();
          }
      }
      
      {1829} normal block at 0x007A95A8, 2400 bytes long.
       Data: <                > 00 00 00 00 00 00 00 00 00 00 00 00 
      00 00 00 00 
      {1402} normal block at 0x007A8C00, 2400 bytes long.
       Data: <                > 00 00 00 00 00 00 00 00 00 00 00 00 
      00 00 00 00 
      {975} normal block at 0x007A8258, 2400 bytes long.
       Data: <                > 00 00 00 00 00 00 00 00 00 00 00 00 
      00 00 00 00 
      {548} normal block at 0x007A78B0, 2400 bytes long.
       Data: <                > 00 00 00 00 00 00 00 00 00 00 00 00 
      00 00 00 00 
      {104} normal block at 0x007A6F08, 2400 bytes long.
       Data: <                > 00 00 00 00 00 00 00 00 00 00 00 00 
      00 00 00 00 
      Object dump complete.
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  4. Ticket change [5bf65c1c1c] (rid 118416) by hobbs on 2004-12-10 09:05:34:

    1. closedate changed to: "2004-12-10T02:05:34"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      Take out the finalize - that's not valid in the loop, it
      should be outside the loop (you only finalize and init once).
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. username: "hobbs"
  5. Ticket change [8764927bce] (rid 131688) by hungtv on 2004-12-10 17:01:02:

    1. icomment:
      Logged In: YES 
      user_id=1172204
      
      After I put Tcl_Finalize method outside the loop, Memory 
      usage is not grow. Could you tell me how to add PURIFY to 
      makefile.vc, please? Tcl core is used in Windows and Win CE.
      
      Thanks.
      
      
      
    2. login: "hungtv"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "hungtv"
  6. Ticket change [4276f34eb9] (rid 116385) by dgp on 2004-12-10 21:30:37:

    1. assignee changed to: "hobbs"
  7. Ticket change [4c0c64e270] (rid 126811) by nobody on 2004-12-15 15:05:52:

    1. icomment:
      Logged In: NO 
      
      After I add PURIFY and rebuild the TCL. The memory leaks 
      have been  removed. Thanks for your help 
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  8. Ticket change [c6ab4677a2] (rid 121809) by hobbs on 2004-12-16 01:30:02:

    1. closedate changed to: "2004-12-15T18:30:02"
    2. closer changed to: "hobbs"
    3. status changed to: "Closed"