clear_memRemoves images from the client's memory. Syntaxvoid clear_mem(file-name) string file-name Description
If you use . GIF as the wild card and clear all .GIF files from memory, you may remove the files for display widgets as well as structure images. Including the window sequence number in the filename of the file name (for example, 1.gif ), ensures that you delete all images in that window without affecting widgets and identical graphics displayed in other windows. ExampleClient memory should be cleared each time the window list is changed. As a rule of thumb, use clear_mem() after field_set(NULL) . The following code is in the normal mode section of the window trigger and executes when the user initiates a query. It initializes all of the display fields, clears image files from memory and G.CACHE_LIST, and initializes a graphics list.
...
else if (G.key == key_f1) { /* put into query mode */
field_set (NULL);
status ("Enter query conditions."
"Hit F1 to execute query or F3 to exit.");
if (list_rows(wl)){
clear_mem(current^^".gif"); /* clear structure images from memory */ clean_cache(current^^".gif"); /* remove structure gifs from cache */ } enter.structure = blank(image(); /* blank image in graphic list */ list_view2(enter.structure,-1,-1,-1,0); /* display blank graphic list */ ...
Updated 19 May 1999. Copyright DataAspects Corp. 1998-1999 |