From c238b3e34e715ebabf756de119a3835f05ccc948 Mon Sep 17 00:00:00 2001 From: hobbs Date: Mon, 2 Jul 2001 23:52:36 +0000 Subject: * generic/tkEntry.c (DestroyEntry): used Tcl_EventuallyFree instead of ckfree for entryPtr to prevent FMRs. [Bug #413904] --- ChangeLog | 5 +++++ generic/tkEntry.c | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e1cc21..5157b01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-07-02 Jeff Hobbs + + * generic/tkEntry.c (DestroyEntry): used Tcl_EventuallyFree + instead of ckfree for entryPtr to prevent FMRs. [Bug #413904] + 2001-06-26 Mo DeJong * unix/Makefile.in: diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 5555b64..805b208 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkEntry.c,v 1.19 2001/04/03 04:40:50 hobbs Exp $ + * RCS: @(#) $Id: tkEntry.c,v 1.20 2001/07/02 23:52:36 hobbs Exp $ */ #include "tkInt.h" @@ -1363,13 +1363,15 @@ DestroyEntry(memPtr) entryPtr->tkwin = NULL; /* - * Tcl_EventuallyFree should be used here or better yet in the + * Tcl_EventuallyFree should be used in * DestroyNotify branch of EntryEventProc. However, that can lead * complications in Tk_FreeConfigOptions where the display for the * entry has been deleted by Tk_DestroyWindow, which is needed - * when freeing the cursor option. + * when freeing the cursor option. Also, there can be a timing + * issue were we wouldn't get called until too late in Tk clean-up, + * and it complains that we haven't freed our fonts yet. */ - ckfree((char *) entryPtr); + Tcl_EventuallyFree((ClientData) entryPtr, TCL_DYNAMIC); } /* -- cgit v0.12