Artifacts Associated With Ticket 227269
Ticket change [e56643741d] (rid 88122) by nobody on 2001-01-02 10:19:14:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
WinNT, Tcl/Tk 8.3.2 I developed a tcl-extension (DLL) and noticed that the delete-proc for my command is not always called. I searched the source but could not find a hint. Tcl and Tk seem to finally call Tcl_Exit(), but the problem seems to be somewhere before that, since calling Tcl_Exit() in my DLL would not call delete-proc either. a button with -command {exit} ## or tclsh and call [exit] ==> delete-proc *not* called a button with -command {destroy .} ==> delete-proc *is* called - foundin initialized to: "obsolete: 8.3.2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: ""
- title initialized to: "[exit] not equal [destroy .]"
- type initialized to: "RFE"
Ticket change [12e7e1029a] (rid 124126) by dkf on 2001-01-16 21:33:24:
- subsystem changed to: "81. Bundled Packages"
Ticket change [58de0cc450] (rid 117872) by dgp on 2001-02-08 07:06:43:
- icomment:
By delete-proc, I assume you're talking about the deleteProc argument (of type (Tcl_CmdDeleteProc *)) passed as the fifth argument to Tcl_Create(Obj)Command(). Your delete-proc will only be called if Tcl_DeleteCommand*() is called on your command. One way that can happen is if Tcl_DeleteInterp() is called on the interp containing your command. That's what happens when wish exits after it detects it has no more windows to manage (after [destroy .]). On the other hand, Tcl_Exit() (and/or Tcl_Finalize()) does not call Tcl_DeleteInterp() on the interpreters in the process. If you need your deleteProc to be called on a Tcl_Exit, you must register an exit handler yourself with Tcl_CreateExitHandler(). That's the solution with Tcl as it is. * * * * One might argue that Tcl_CreateInterp() should register its own exit handler so that Tcl_Exit() destroys all interps. That new feature would also give you what you want, but it would need to be proposed to the core team in a TIP for careful consideration. One might also question why Tk_Main() ends with a call to Tcl_DeleteInterp(), but Tcl_Main() does not. In short, there's no bug here, but there may be a mis-feature or two.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [96e531b0b4] (rid 106407) by dgp on 2001-04-05 08:13:49:
- foundin changed to: "None"
- subsystem changed to: "None"
Ticket change [8df2e9bf4f] (rid 128028) by dgp on 2001-04-05 08:15:02:
- subsystem changed to: "45. Parsing and Eval"
Ticket change [850fe11956] (rid 131261) by dgp on 2001-04-17 04:42:20:
- icomment:
Logged In: YES user_id=80530 See also FR 218075
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [89cea540a3] (rid 127287) by dgp on 2003-11-13 06:02:58:
- assignee changed to: "dgp"
Ticket change [89edb5c3bc] (rid 127307) by dgp on 2006-06-10 02:48:48:
- closedate changed to: "2006-06-09T19:48:48"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 see comments @ FR 218075
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Rejected"
- status changed to: "Closed"
- username: "dgp"