QUESTION: When using XtGetValues, do I need to deallocate the memory of the
resources that was obtained by XtGetValues.
For example: This procedure will scroll the given scroll_window down one page.
The question is whether I would need to deallocate the memory
for the variables: scroll_bar, top, slider_size, etc...
void scroll_down_one_page
(
Widget scroll_window
)
{
Widget scroll_bar;
int n, top, slider_size, increment, pageIncrement,
maximum, minimum;
Arg args[5];
n = 0;
XtSetArg(args[n], XmNverticalScrollBar, &scroll_bar); n++;
XtGetValues(scroll_window, args, n);
n = 0;
XtSetArg(args[n], XmNmaximum, &maximum); n++;
XtSetArg(args[n], XmNminimum, &minimum); n++;
XtGetValues(scroll_bar, args, n);
XmScrollBarGetValues(scroll_bar, &top, &slider_size, &increment,
&pageIncrement);
/* scroll down one page
*/
if (maximum != slider_size)
{
top += pageIncrement;
if (top > (maximum - slider_size))
top = maximum - slider_size;
XmScrollBarSetValues(scroll_bar, top, slider_size,
increment, pageIncrement, True);
}
/* do I need to deallocate any memory used here ??
*/
}
Thanks for any help in advance!!
Kristina
--
Orbital Engine Company (Australia) orb...@DIALix.oz.au
1 Whipple St Tel: (061-09) 441 2311
Balcatta WA 6021
Australia