Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!spool.mu.edu!snorkelwacker.mit.edu!hsdndev!cmcl2!uupsi!sunic!ugle.unit.no!mti.unit.no!asma From: asma@mti.unit.no (Asbjoern Mangerud) Newsgroups: comp.windows.x.motif Subject: Re: MessageBox - Free old message string?? Message-ID: <1991Jun27.114057.29740@ugle.unit.no> Date: 27 Jun 91 11:40:57 GMT References: Sender: news@ugle.unit.no Reply-To: asma@mti.unit.no Distribution: comp Organization: The Norwegian Institute of Technology, University of Trondheim Lines: 31 In article , 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 -------------------------------------------------------------------------------