: <i>Interpreter Associated data delete proc not called when tcls</i> plus 7 other changes
by
.
D 2006-06-10T02:48:37
J closedate 2006-06-09T19:48:37
J closer dgp
J icomment Logged\sIn:\sYES\s\nuser_id=80530\n\n\nI\smade\san\sattempt\sto\screate\sa\spatch\nthat\simplements\sthis\sfeature\srequest\nand\sdiscovered\swhy\sit\swon't\smesh\swith\nTcl's\sdesign.\n\nThe\slogic\sthat\scontrols\sthe\sdestruction\nof\sa\sTcl_Interp\sis\sto\sdefer\sthe\steardown\nof\sthe\sinterp\s(including\sall\sthe\scallbacks\nthat\sclean\sup\sassocdata\sand\sthat\stend\sto\ncommand\sdeletion\sissues),\suntil\sall\s\n"active\sevals"\sin\sthe\sinterp\shave\sfully\nunwound.\n\nProbably\sthe\smost\sfrequent\sway\sTcl_Exit()\ngets\scalled\sis\svia\sthe\sevaluation\sof\nthe\s[exit]\scommand.\s\sWhen\s[exit]\sis\sgetting\nevaluated,\sthe\sinterp\sis\sbusy,\sso\snone\nof\sits\scleanup\sis\sgoing\sto\sbe\sdone\sanyway.\n\nThis\smeans\sthe\sonly\sway\sto\sbe\ssure\san\nimportant\sbit\sof\scleanup\sof\sassocdata\n(subject\sof\sthis\sreport)\sgets\sdone\sis\nto\suse\sboth\sthe\s"delProc"\sargument\sto\nTcl_SetAssocData()\sto\shandle\scleanup\nin\sthe\scase\sthat\san\sinterp\sgets\sdeleted\nbefore\sprocess\sfinalization,\sand\salso\nto\suse\sTcl_Create(Thread)ExitHandler()\nto\sregister\sa\scleanup\scallback\sto\nhandle\scleanup\sduring\sprocess\sfinalization.\n\nThe\stwo\scleanup\sroutes\sneed\sto\sbe\saware\sof\neach\sother\sas\swell\sso\sthey\sdon't\sboth\sfire,\nor\sif\sthey\sdo\sboth\sfire,\sthey\scan\shandle\nany\spossible\sstate.\n\nNote\sthat\ssome\stypes\sof\scleanup\sthat\sare\nimportant\sin\sthe\sinterp\sdeletion\scase\n(like\smemory\sfree-ing\sto\savoid\smemory\sleaks)\nneed\snot\sbe\shandled\sat\sprocess\sfinalization\ntime,\swhen\sthe\sOS\swill\sdo\sthe\srelevant\scleanup\nanyway.\n
J login dgp
J mimetype text/plain
J resolution Rejected
J status Closed
J username dgp
K 218075ffffffffffffffffffffffffffffffffff
U dgp
Z a732aa4749fd434ad107271b80cb108e