koolish@bbn.com (Dick Koolish) (05/07/90)
It is my impression that when I call XCreateImage that the 'data' parameter points to image memory that I must allocate. O'Reilly Vol 2 states that for XDestroyImage that it deallocates the image memory as well as the XImage structure. Does it really deallocate the image memory?
rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (05/08/90)
Does [XDestroyImage] really deallocate the image memory? Yes, I'm afraid it does. [Several Xlib image routines are pretty broken.] You either have to null out this field before you destroy, or else after you create you can replace the destroy_image function in the image object with one of your own choosing.