.
D 2000-10-26T00:52:54
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s1630\sBug\nVersion:\s8.1b1\nSubmitDate:\s'1999-03-25'\nLastModified:\s'1999-11-30'\nSeverity:\sMED\nStatus:\sClosed\nSubmitter:\spat\nChangedBy:\shobbs\nOS:\sOther\nOSVersion:\sBSD/OS\s4.0.1\nMachine:\sNA\nFixedDate:\s'2000-10-25'\nClosedDate:\s'1999-11-30'\n\n\nName:\nRobert\sHare\n\nReproducibleScript:\n\s\s\s\sDelete\sprocedures\sregistered\susing\sTcl_SetAssocData\sare\snot\scalled\n\s\s\s\sduring\sa\n\s\s\s\sTcl_Exit.\sIt\sseems\slike\scalling\sTcl_Exit\swould\sdelete\n\s\s\s\seach\sinterpreter\sand\scall\sall\sregistered\sdelete\sprocedures\sand\sthen\sexit\n\s\s\s\sthe\sprocess.\s\sIs\sthere\sa\sreason\sit\sis\snot\sdone\sthis\sway?\s\sIt\sseems\slike\n\s\s\s\sthis\smight\n\s\s\s\sget\srid\sof\shaving\sto\sregister\sso\smany\sexit\shandlers.\n\s\s\s\s\n\s\s\s\sThis\sis\sbasically\sjust\san\sarchitectual\squestion.\s---\sThanks\n\n\n\n\n\nNote,\sthis\sis\spart\sRFE,\spart\sbug.\s\sThe\sproblem\sis\swhen\sthere\sare\sshared\sresources\sbetween\sa\sTcl\sshell\sand\sanother\sprocess.\s\sIf\sthe\sresource\sis\snot\sexplicitly\sfreed\son\sexit,\sit\swill\sappear\sto\sthe\sother\sprocess\sthat\sthe\sshell\sis\sstill\sreserving\sthe\sresource.\s\s\n\nThe\sconcern\sis\sthat\sfinalization\swill\sbe\sreally\sslow\sif\swe\sexplicitly\scall\seach\sfree\sproc.\s\sMaybe\swe\sneed\sto\shave\sthe\sability\sto\sspecify\show\sto\sexit,\sor\smaybe\sthe\sspeed\sconcerns\sturn\sout\sto\sbe\sirrelevant.\s\seither\sway\swe\sneed\sto\slook\sinto\sa\ssolution.\n\nI\semailed\sRobert\sagain\strying\sto\sclear\sthe\smatter\sup.\sHere\swas\shis\sresponse:\n\nI\sunderstand\sthat\sit\sis\scalled\sduring\sa\sTcl_DeleteInterp.\s\sMy\squestion\sis\nwhy\sdoesn't\sTcl_Exit\sdo\sall\sthe\ssame\sthings?\s\sIt\sseems\sstrange\sto\streat\nexiting\san\sapplication\sdifferently\sthan\sjust\sdeleting\sall\sinterpreters\sand\nthen\sexiting.\n\nThe\sway\sit\sis\sdone\snow\sassumes\sthat\sthe\sonly\sreason\syou\swould\swant\sthe\nroutines\sregistered\swith\sthe\sinterpreter\sto\srun\son\sexit\sis\sto\sclear\sup\nmemory.\sWhat\sabout\sother\sresources\sallocated\sby\sextensions?\s\n\nHere\sis\san\sexample:\n\nI\shave\sa\sextension\sfor\sa\sdatabase.\s\sDuring\sthe\scourse\sof\susing\sthe\nextension\sconnections\sto\sthe\sdatabase\sare\screated.\s\sThese\sare\sdone\susing\sa\nshared\smemory\ssegment.\s\sIf\sthe\sapplication\sexits\sor\sthe\sinterpreter\sis\ndeleted\sall\sresources\sallocated\s(including\sshared\smemory)\sneed\sto\sbe\nfreed.\s\sSimply\sexiting\sthe\sapplication\scan\sleave\sshared\smemory\ssegments\nstill\sin\suse\sand\sreally\smess\sup\sother\sprocesses\susing\sthem.\s\s\n\nWhy\schoose\sto\shandle\san\sapplication\sexit\sin\sa\sspecial\sway?\s\sThe\smore\sI\nthink\sabout\sit,\sthe\smore\sthis\sseems\slike\sa\sbug.\s:-)\n\n04/07/1999\s11:33\s-\ssurles\s-\n\n--\nAll\sin\sall,\sthe\suser\sshould\smatch\sTcl_CreateInterp\swith\sTcl_DeleteInterp\nif\sthey\swant\sAssocData\shandlers\sto\sbe\scalled.\s\sOtherwise,\sthe\sbetter\nway\sto\shandle\sthis\sis\sto\suse\sTcl_CreateExitHandler\sand\nTcl_DeleteExitHandler\sto\smake\ssure\scleanup\sis\sdone\struly\son\sexit.\s\n--\s11/30/1999\shobbs\n\n
J foundin obsolete:\s8.1b1
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 69.\sOther
J title Interpreter\sAssociated\sdata\sdelete\sproc\snot\scalled\swhen\stcls
J type RFE
K 218075ffffffffffffffffffffffffffffffffff
U nobody
Z 4a562da9c0a58b4f92de15c1b483c692