bnz
asked on
Free and OnClose caFree
Hi
If I in a OnClose event for a form have set Action to caFree and then call Free for the form. Should this result in a memory access error or is this another fault in my program?
If I in a OnClose event for a form have set Action to caFree and then call Free for the form. Should this result in a memory access error or is this another fault in my program?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That would depend on the the way he is showing it, if he is showing it Modally ( using .ShowModal ), the Close would be rather obsolete.
As I said before, simply use .Release instead of free. The release will send a CM_RELEASE message, the form will process all messages until it reaches the CM_RELEASE and when it reaches that one it will destroy itself. Simple as that ;-)
Regards,
Stefaan
As I said before, simply use .Release instead of free. The release will send a CM_RELEASE message, the form will process all messages until it reaches the CM_RELEASE and when it reaches that one it will destroy itself. Simple as that ;-)
Regards,
Stefaan
ziolko.