>>>Is there any function to call to garbagecollect this, or a way to flush the buffers and whatever iPicture uses? Or should I be better off using plain fox-native image objects?
>>
>>You could try CLEAR RESOURCES. I don't know if VFPX LOADPICTURE() will respond to that, though.
>
>It seems the combination of loadpicture() inside getInterface() and/or returning an iPicture object from a function was the cause.
>
>Now I've put a simple image object on the form(s), and filling it with an object I got from loadpicture() (still need to check if it's null, sometimes it is)...
>
loPic=LoadPicture(lcFullp)
>lofrm.img.pictureval=lopic
>...and there seems to be no leak. I'm still creating an iPicture object inside the routine which gets/saves the dimensions of the picture, but it seems to do no harm as long as it isn't passed into or from a method. I wonder what would happen if I set it as a property of some global object...
>
>Well, never mind.
>
>And, ah, the loFrm.img.picture=lcFullp still works, but... in many cases I'm getting fewer bitplanes - the rendering of the image is rather ugly and looks like it's reverting to 16 or 64 or 256 colors. So loadpicture()... which works.
I wonder if any dangling references are piling up? Maybe what you were doing was a code path that wasn't hitting normal/expected cleanup code.
I think source is available for all of VFPX (?) If so you could check it out, contribute reliability patch(es) :)
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up