comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: memory leaks with xloadct?

memory leaks with xloadct?
type: item
description: Hi, I have been using XLOADCT in a widget program and I ran into a problem with leaking memory. When I run XLOADCT in a widget program where the top-level base of the widget program is the group leader for XLOADCT, quitting the widget program while XLOADCT is running SHOULD be seamless. However I consistently have leaking memory with the following in the output log: <PtrHeapVar391904> STRUCT = -> WIDGET_BUTTON Array[1] A short program illustrating this is listed below. To reproduce this, run the program, press the button labeled "change colors", then press the "quit" button on the widget program while XLOADCT is still running. Then there should be a pointer to a structure leftover. Do others get the same leaking memory? Any help or thoughts would be greatly appreciated! Rob P.S. I am aware (and often use) XCOLORS by David Fanning in my widget programs but I DO have a reason for using XLOADCT in this particular case. Robert M. Dimeo, Ph.D. NIST Center for Neutron Research National Institute of Standards and Technology 100 Bureau Drive - Stop 8562 Gaithersburg, MD 20899-8562 Telephone: (301) 975-8135 FAX: (301) 921-9847 www.ncnr.nist.gov/staff/dimeo ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;; pro plotData,event winId = widget_info(event.top,find_by_uname = 'DISPLAY') widget_control,winId,get_value = winVis wset,winVis tvscl,hanning(!d.x_size,!d.y_size) end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;; pro xloadct_test_refresh, data = data plotData,data end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;; pro xloadct_test_handler,event widget_control,event.id,get_value = val case val[0] of 'CHANGE COLORS': $ begin xloadct,group = event.top,updatecallback = 'xloadct_test_refresh', $ updatecbdata = event,/silent end 'QUIT': $ begin widget_control,event.top,/destroy help,/heap,/brief end else: endcase end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;…
creator: robert.dimeo
date: 2003-01-08T19:14:52-00:00