.
D 2001-02-08T07:06:43
J icomment By\sdelete-proc,\sI\sassume\syou're\stalking\sabout\sthe\ndeleteProc\sargument\s(of\stype\s(Tcl_CmdDeleteProc\s*))\npassed\sas\sthe\sfifth\sargument\sto\sTcl_Create(Obj)Command().\n\nYour\sdelete-proc\swill\sonly\sbe\scalled\sif\sTcl_DeleteCommand*()\nis\scalled\son\syour\scommand.\s\sOne\sway\sthat\scan\shappen\sis\nif\sTcl_DeleteInterp()\sis\scalled\son\sthe\sinterp\scontaining\nyour\scommand.\s\sThat's\swhat\shappens\swhen\swish\sexits\safter\nit\sdetects\sit\shas\sno\smore\swindows\sto\smanage\s(after\n[destroy\s.]).\n\nOn\sthe\sother\shand,\sTcl_Exit()\s(and/or\sTcl_Finalize())\ndoes\snot\scall\sTcl_DeleteInterp()\son\sthe\sinterpreters\nin\sthe\sprocess.\s\sIf\syou\sneed\syour\sdeleteProc\sto\sbe\scalled\non\sa\sTcl_Exit,\syou\smust\sregister\san\sexit\shandler\syourself\nwith\sTcl_CreateExitHandler().\s\sThat's\sthe\ssolution\swith\nTcl\sas\sit\sis.\n\n\s*\s*\s*\s*\n\nOne\smight\sargue\sthat\sTcl_CreateInterp()\sshould\sregister\nits\sown\sexit\shandler\sso\sthat\sTcl_Exit()\sdestroys\sall\ninterps.\s\sThat\snew\sfeature\swould\salso\sgive\syou\swhat\syou\nwant,\sbut\sit\swould\sneed\sto\sbe\sproposed\sto\sthe\score\steam\nin\sa\sTIP\sfor\scareful\sconsideration.\n\nOne\smight\salso\squestion\swhy\sTk_Main()\sends\swith\sa\scall\nto\sTcl_DeleteInterp(),\sbut\sTcl_Main()\sdoes\snot.\n\nIn\sshort,\sthere's\sno\sbug\shere,\sbut\sthere\smay\sbe\sa\s\nmis-feature\sor\stwo.\n
J login dgp
J mimetype text/plain
J username dgp
K 227269ffffffffffffffffffffffffffffffffff
U dgp
Z c072df8cda612b91ccc6d34cfd5ab4fb