Artifacts Associated With Ticket 1049909
Ticket change [d6999ac188] (rid 123834) by jslisong on 2004-10-19 09:50:25:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- 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(); } - foundin initialized to: "obsolete: 8.4.7"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "jslisong"
- subsystem initialized to: "10. Objects"
- title initialized to: "Obj Memory Leak"
- type initialized to: "Bug"
Ticket change [d16d7d1faa] (rid 113344) by msofer on 2004-10-19 17:06:24:
- closedate changed to: "2004-10-19T10:06:24"
- closer changed to: "msofer"
- 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
- login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- username: "msofer"