Jump to content
dmitrybv

TFmxObject.FreeNotification, TComponent.FreeNotification, TFmxObject.AddFreeNotify

Recommended Posts

1.
I wonder why the FMX developers changed the logic of the FreeNotification method in the TFmxObject class so much.


The `TComponent.FreeNotification` method adds a component to the list of components that will receive a message when deleted.
The `TFmxObject.FreeNotification` method sends the opRemove message.

 

2.
The `TFmxObject.AddFreeNotify` method does not check that the component is already present in the list. In this way, you can accumulate a huge number of references to the same object.

How can I configure the algorithm so that my object is added only once?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×