{"id":7362,"date":"2022-12-20T19:37:49","date_gmt":"2022-12-20T22:37:49","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/tcl_callwhendeleted-man3-2\/"},"modified":"2022-12-20T19:37:49","modified_gmt":"2022-12-20T22:37:49","slug":"tcl_callwhendeleted-man3-2","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/tcl_callwhendeleted-man3-2\/","title":{"rendered":"Tcl_CallWhenDeleted (man3)"},"content":{"rendered":"<h1 align=\"center\">Tcl_CallWhenDeleted<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#ARGUMENTS\">ARGUMENTS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#KEYWORDS\">KEYWORDS<\/a> <\/p>\n<hr>\n<p>______________________________________________________________________________<\/p>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Tcl_CallWhenDeleted, Tcl_DontCallWhenDeleted \u2212 Arrange for callback when interpreter is deleted<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <tcl.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_CallWhenDeleted<\/b>(<i>interp<\/i>, <i>proc<\/i>, <i>clientData<\/i>)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_DontCallWhenDeleted<\/b>(<i>interp<\/i>, <i>proc<\/i>, <i>clientData<\/i>)<\/p>\n<h2>ARGUMENTS <a name=\"ARGUMENTS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"47%\">\n<p style=\"margin-top: 1em\">Tcl_Interp <i>*interp<\/i> (in)<\/p>\n<\/td>\n<td width=\"24%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\">Interpreter with which to associated callback.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"47%\">\n<p>Tcl_InterpDeleteProc <i>*proc<\/i> (in)<\/p>\n<\/td>\n<td width=\"24%\"><\/td>\n<td width=\"18%\">\n<p>Procedure to call when <i>interp<\/i> is deleted.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"47%\">\n<p>ClientData <i>clientData<\/i> (in)<\/p>\n<\/td>\n<td width=\"24%\"><\/td>\n<td width=\"18%\">\n<p>Arbitrary one-word value to pass to <i>proc<\/i>.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:82%;\">______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_CallWhenDeleted<\/b> arranges for <i>proc<\/i> to be called by <b>Tcl_DeleteInterp<\/b> if\/when <i>interp<\/i> is deleted at some future time. <i>Proc<\/i> will be invoked just before the interpreter is deleted, but the interpreter will still be valid at the time of the call. <i>Proc<\/i> should have arguments and result that match the type <b>Tcl_InterpDeleteProc<\/b>:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">typedef void <b>Tcl_InterpDeleteProc<\/b>( <br \/> ClientData <i>clientData<\/i>, <br \/> Tcl_Interp *<i>interp<\/i>);<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>clientData<\/i> and <i>interp<\/i> parameters are copies of the <i>clientData<\/i> and <i>interp<\/i> arguments given to <b>Tcl_CallWhenDeleted<\/b>. Typically, <i>clientData<\/i> points to an application-specific data structure that <i>proc<\/i> uses to perform cleanup when an interpreter is about to go away. <i>Proc<\/i> does not return a value.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_DontCallWhenDeleted<\/b> cancels a previous call to <b>Tcl_CallWhenDeleted<\/b> with the same arguments, so that <i>proc<\/i> will not be called after all when <i>interp<\/i> is deleted. If there is no deletion callback that matches <i>interp<\/i>, <i>proc<\/i>, and <i>clientData<\/i> then the call to <b>Tcl_DontCallWhenDeleted<\/b> has no effect.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Note that if the callback is being used to delete a resource that <i>must<\/i> be released on exit, <b>Tcl_CreateExitHandler<\/b> should be used to ensure that a callback is received even if the application terminates without deleting the interpreter.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Tcl_CreateExitHandler(3), Tcl_CreateThreadExitHandler(3)<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">callback, cleanup, delete, interpreter<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  Tcl_CallWhenDeleted, Tcl_DontCallWhenDeleted \u2212 Arrange for callback when interpreter is deleted <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2536],"tags":[2538,3007,3676],"class_list":["post-7362","post","type-post","status-publish","format-standard","hentry","category-3-llamadas-de-bibliotecas","tag-2538","tag-man3","tag-tcl_dontcallwhendeleted"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7362"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7362\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}