|
Top Document: comp.windows.x.intrinsics Frequently Asked Questions (FAQ) Previous Document: 40. Why does XtGetValues not work for me (sic)? Next Document: 42. Is this a memory leak in the X11R4 deletion of work procs?! See reader questions & answers on this topic! - Help others by sharing your knowledge
----------------------------------------------------------------------
Yes. This is the "unofficial" fix-19 for the X11R4 Destroy.c:
*** Destroy.c.1.37 Thu Jul 11 15:41:25 1991
--- lib/Xt/Destroy.c Thu Jul 11 15:42:23 1991
***************
*** 1,4 ****
--- 1,5 ----
/* $XConsortium: Destroy.c,v 1.37 90/09/28 10:21:32 swick Exp $ */
+ /* Plus unofficial patches in revisions 1.40 and 1.41 */
/***********************************************************
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
***************
*** 221,239 ****
*/
int i = 0;
! DestroyRec* dr = app->destroy_list;
while (i < app->destroy_count) {
if (dr->dispatch_level >= dispatch_level) {
Widget w = dr->widget;
if (--app->destroy_count)
bcopy( (char*)(dr+1), (char*)dr,
! app->destroy_count*sizeof(DestroyRec)
);
XtPhase2Destroy(w);
}
else {
i++;
- dr++;
}
}
}
--- 222,245 ----
*/
int i = 0;
! DestroyRec* dr;
while (i < app->destroy_count) {
+
+ /* XtPhase2Destroy can result in calls to XtDestroyWidget,
+ * and these could cause app->destroy_list to be reallocated.
+ */
+
+ dr = app->destroy_list + i;
if (dr->dispatch_level >= dispatch_level) {
Widget w = dr->widget;
if (--app->destroy_count)
bcopy( (char*)(dr+1), (char*)dr,
! (app->destroy_count - i) * sizeof(DestroyRec)
);
XtPhase2Destroy(w);
}
else {
i++;
}
}
}
[from Donna Converse, converse@x.org]
User Contributions:Top Document: comp.windows.x.intrinsics Frequently Asked Questions (FAQ) Previous Document: 40. Why does XtGetValues not work for me (sic)? Next Document: 42. Is this a memory leak in the X11R4 deletion of work procs?! Single Page [ Usenet FAQs | Web FAQs | Documents | RFC Index ] Send corrections/additions to the FAQ Maintainer: ware@cis.ohio-state.edu
Last Update March 27 2014 @ 02:11 PM
|

Comment about this article, ask questions, or add new information about this topic: