trichview.com

trichview.support




Re: freeing controls


Return to index


Author

Message

Sergey Tkachenko

Posted: 02/12/2005 20:26:47


Clear frees all the inserted components.

But it does not modify external references to them (because it cannot).

So btnYes variable remains not nil, but now it points to the freed memory.

In this case, the result of calling (btnYes.Parent<>nil) is unpredictable -

it can return True, it can return False, it can generate access violation

exception.


You can use the buttons destructor, or rvMacNav.OnControlAction event to

detect when the button is destroyed.





Powered by ABC Amber Outlook Express Converter