Re: Problem freeing components with .free



On Feb 15, 4:43?pm, "TeChNoInSiDe" <tomatin...@xxxxxxxxx> wrote:
<snip>
Onclick handler calls a saveimageshandler() procedure.
saveimageshandler() procedure posts a message to the form.
saveimages() receives the message, do saving routines and destroys all
the components with no other troubles!

<snip>

There might be a possibility of it not working properly, I believe.

Button calls OnClick
OnClick calls SaveImageHandler
SaveImageHandler posts message and returns towards OnClick
Application may handle message and call messagehandler which frees
button before ...
Execution returns to OnClick from saveImagehandler
OnClick returns to Button code which has been freed by now.

Is this a possibility ? IMO OnClick should post message as last code
line following SaveImages call. Then the message will always be
handled after OnClick returns.

Alan Lloyd

.


Quantcast