[comp.windows.x.motif] XtRemoveAllCallbacks in Destroy method

thsrem@regent.e-technik.tu-muenchen.dbp.de (Thomas Schneider) (08/25/90)

Is it necessary to XtRemoveAllCallbacks for all callback types in
my wigdet destroy method ?

"X Toolkit Intrinsics - C Language Interface" X11R3 says in chapter
2.7:
In phase two, XtDestroyWidget performs the following on each entry
in the destroy list:
....
*  Recursively descends the tree and deallocates all pop-up widgets,
   constraint records, callback lists and, if the widget is a subclass
   of compositeWidgetClass, children.

On the other hand a lot of MOTIF widgets call XtRemoveAllCallbacks in
their destroy method, for instance ArrowB.c:
   XtRemoveAllCallbacks (aw, XmNactivateCallback);
   XtRemoveAllCallbacks (aw, XmNarmCallback);
   XtRemoveAllCallbacks (aw, XmNdisarmCallback);

Is this necessary ?

Thanks for clarification.
--
Thomas Schneider
/dev Software, Munich
UUCP: uunet!unido!tumuc!ths