Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!ccut!kogwy!new1!roger From: roger@zuken.co.jp (Roger Meunier) Newsgroups: comp.windows.x Subject: XmStringFree() timing Message-ID: Date: 3 Jul 90 14:51:28 GMT Sender: news@new1.zuken.co.jp Organization: ZUKEN Inc. Yokohama, JAPAN Lines: 20 I am using the Motif FileSelectionBox, with the application setting the dirSpec and dirMask at various times. Both of these resources require an XmString as the value. I create the value using XmStringCreate(), and deallocate it using XmStringFree(). My question is the following. Does the widget make a copy of the resources I pass it at the *time* that I pass it, or at the time the widget is realized, or at the time that it processes its first event in the event loop? With other widgets, I seem to be able to deallocate the string immediately after XmCreateXXX() and XtSetValues(), but if I try to do this with FileSelectionBox, my program often crashes later on. So what is the acceptable timing for freeing these string resources? Thanks in advance. -- Roger Meunier @ Zuken, Inc. Yokohama, Japan (roger@zuken.co.jp)