Skip to content
Tcl Source Code Artifact [2b81c100ce]
Login

Artifact [2b81c100ce]

Artifact 2b81c100ce6c493f4b13e6898f0738225290e954edb32189720296f27fb33b2c:

Ticket change [2b81c100ce] - Ticket [28027d8bb7745fb0|28027d8bb7] <i>Per-interp Loaded library structures not cleaned up on interp exit.</i> status still Open with 4 other changes by pooryorick on 2021-05-15 22:30:31.
D 2021-05-15T22:30:31.526
J icomment Fixed\sin\s[a4de334c5f297a92].\s\sIn\sorder\sto\sproperly\sclean\sup,\sthe\sloaded\r\npackage,\sin\sthis\scase\spkgua.c,\smust\sbe\snotified\swhen\sa\scommand\sis\sdeleted\sso\r\nthat\sit\scan\sadjust\sits\sbooks\saccordingly.\s\sA\snew\scallback,\sCommandDeleted,\sis\r\nprovided\sto\sTcl_CreateObjCommand,\sand\sit\sdoes\sthe\saccounting\sso\sthat\sthe\sunload\r\nroutine\sdoesn't\stry\sto\sdelete\sa\scommand\sthat\shas\salready\sbeen\sdeleted.\r\n\r\nAdditionally,\sa\snew\sroutine,\sUnloadLibrary,\sserves\sboth\sTcl_UnloadObjCmd\sand\r\nLoadCleanupProc,\swhich\stakes\scare\sof\scleanup\swhen\san\sinterpreter\sis\sdeleted.\r\nSee\s[723d1eb93779e81b].\s\sUnloadLibrary\sperforms\stwo\sdistinct\sfunctions:\r\n\r\n*\sremove\sthe\slibrary\sfrom\san\sinterpreter\r\n\r\n*\sunload\sthe\slibrary\sfrom\sthe\sprocess\r\n\r\nIt\sis\svalid\sto\sremove\s\slibrary\sfrom\san\sinterpreter\swithout\sunloading\sthe\r\nlibrary\sfrom\sthe\sprocess.\s\sStatic\slibraries,\sfor\sexample,\scan\snot\sbe\sunloaded\r\nfrom\sthe\sprocess,\sbut\sunloading\sthem\sfrom\san\sinterpreter\scleans\sup\sstorage\r\nallocated\sto\skeep\strack\sof\slibraries\sloaded\sinto\sinterpreters.\s\sIn\sorder\sto\r\ncompletely\sclean\sup\son\sinterpreter\sdeletion,\sit\sis\snecessary\sto\sdeallocate\sthis\r\nstorage,\seven\sfor\sa\sstatic\slibrary.\r\n\r\nThis\snew\simplementation\salso\srelies\son\sa\schange\smade\sto\r\ntclBasic.c/DeleteInterpProc:\s\sWhen\sassociated\sdata\sis\sdeleted,\sthe\r\ncorresponding\sTcl_InterpDeleteProc\sis\snow\scalled\sbefore\sthe\sdata\sis\sactually\r\ndeleted\sinstead\sof\safter.\s\sThis\sallows\sthe\sTcl_InterpDeleteProc\sto\suse\sthe\r\nassociated\sdata.\sSee\scommit\s[ccfd61a7cf6bce85].
J login pooryorick
J mimetype text/x-fossil-wiki
J resolution Fixed
K 28027d8bb7745fb053954276bb62aa4d6e340b16
U pooryorick
Z d60ce2a70553394d78579c4f527ee9b8