Artifacts Associated With Ticket 1081975fffffffff
Ticket change [71dd70d19d] (rid 100757) by hungtv on 2004-12-09 10:07:32:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- 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. - foundin initialized to: "obsolete: 8.4.9"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "hungtv"
- subsystem initialized to: "41. Memory Allocation"
- title initialized to: "Memory leaks 2400 bytes long."
- type initialized to: "Bug"
Ticket change [3abd2965d1] (rid 112611) by dgp on 2004-12-09 23:10:07:
- assignee changed to: "dgp"
- closedate changed to: "2004-12-09T16:10:07"
- closer changed to: "dgp"
- 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.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Pending"
- username: "dgp"
Ticket change [82da9461e9] (rid 117298) by nobody on 2004-12-10 08:56:46:
- 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. - login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [5bf65c1c1c] (rid 118416) by hobbs on 2004-12-10 09:05:34:
- closedate changed to: "2004-12-10T02:05:34"
- closer changed to: "hobbs"
- 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).
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
Ticket change [8764927bce] (rid 131688) by hungtv on 2004-12-10 17:01:02:
- 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.
- login: "hungtv"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "hungtv"
- icomment:
Ticket change [4276f34eb9] (rid 116385) by dgp on 2004-12-10 21:30:37:
- assignee changed to: "hobbs"
Ticket change [4c0c64e270] (rid 126811) by nobody on 2004-12-15 15:05:52:
- icomment:
Logged In: NO After I add PURIFY and rebuild the TCL. The memory leaks have been removed. Thanks for your help
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [c6ab4677a2] (rid 121809) by hobbs on 2004-12-16 01:30:02:
- closedate changed to: "2004-12-15T18:30:02"
- closer changed to: "hobbs"
- status changed to: "Closed"