praveen@etnibsd.UUCP (Praveen Limbachiya) (08/28/90)
Our Application has few screens and they are updated at real time using many database. We found that our application crashes every few hours. The reason was the application was continuously eating memory. We use our own string to XmString convertor using XmStringLtoRCreate for all resources. All Strings used in the application are put in resource files because our application is supposed to be multiliguial (sp ?) and it will be very easy to replace in the resource files. Initially we thought it is related to our work. After several hours of debugging, we found bug in XmStringLtoRCreate. > a = XmStringSegmentCreate ( /* create this component */ > start, charset, > XmSTRING_DIRECTION_L_TO_R, > ! done); /* separators except at end */ > > b = string; /* add this component */ > String = XmStringConcat (b, a); > if (b != (XmString) NULL) XtFree (b); > Here XmString 'a' is never freed, hence all these. You can add 'XtFree(a);' till you get the fix. BTW this is motif version 1.0A. I hope it is fixed in version 1.1 Praveen Limbachiya Eaton Corporation Semiconductor Equipment Division Beverly, Mass. 01915 (508)921-9690 -- --------------------------- Praveen Limbachiya uunet!etnibsd!praveen (Use this address explicitly)
nazgul@alphalpha.com (Kee Hinckley) (08/31/90)
> > BTW this is motif version 1.0A. I hope it is fixed in version 1.1 > It appears to be, although it still has a comment saying that there is a memory leak I don't see one anymore. >