[comp.windows.x.motif] MessageBox - Free old message string??

hans@ele.tue.nl (& Fleurkens) (06/27/91)

I want to show different strings in the same Information Dialog
(created with a XmCreateInformationDialog).
I can set a new string by using XtSetArg for the XmNmessageString resource
and XtSetValues.

Is there any need to get the old value of this resource, before setting
the new one? Or will the old one be freed automatically?
What's the right way to prevent a memory leak here?

Hans Fleurkens
e-mail: hans@es.ele.tue.nl

asma@mti.unit.no (Asbjoern Mangerud) (06/27/91)

In article <HANS.91Jun27111342@eutes4.ele.tue.nl>, hans@ele.tue.nl (&
Fleurkens) writes:

>I want to show different strings in the same Information Dialog
>(created with a XmCreateInformationDialog).
>I can set a new string by using XtSetArg for the XmNmessageString resource
>and XtSetValues.
>
>Is there any need to get the old value of this resource, before setting
>the new one? Or will the old one be freed automatically?
>What's the right way to prevent a memory leak here?
>
>Hans Fleurkens
>e-mail: hans@es.ele.tue.nl
>

The widget it self will free the memory, so you don't have to worry about that.

Asbjorn Mangerud

-------------------------------------------------------------------------------
Asbjorn Mangerud                        Asbjorn Mangerud
Division of Structural Engineering      Inst. for Konstruksjonteknikk
Rich. Birkelands vei 1a                 Rich. Birkelands vei 1a
7034 Trondheim-NTH                      7034 Trondheim-NTH
Norway                                  Norway
-------------------------------------------------------------------------------
THE UNIVERSITY OF TRONDHEIM    -ooOoo-    THE NORWEGIAN INSTITUTE OF TECHNOLOGY
-------------------------------------------------------------------------------
E-mail: asma@mti.unit.no        Voice: +47-7-59 46 87       Fax: +47-7-59 45 35
-------------------------------------------------------------------------------