[fpc-devel] FreeNotification and opRemove

Torsten Bonde Christiansen tc at epidata.info
Thu Mar 8 15:06:13 CET 2012


On 2012-03-08 14:51, Martin wrote:
> On 08/03/2012 13:44, Martin wrote:
>>
>>
>> In the following code, I thing is the problem:
>>
>> Procedure TComponent.Notification(AComponent: TComponent;
>>   Operation: TOperation);
>> Var Runner : Longint;
>> begin
>>   If (Operation=opRemove) and Assigned(FFreeNotifies) then
>>     begin
>>     FFreeNotifies.Remove(AComponent);
>> ...
>>
>> It removes only one of the 2 notify entries.
>>
>> If opRemove is to remove FreeNotifications, then it mus remove them 
>> bi-directional, same as RemoveFreeNotification does
>>
>
> That is: I have not checked if Delphi removes the FreeNotify at all.
> But I assume, if it does, it does both...
I can confirm the D7 does remove both - it calls:

*AComponent.RemoveNotification(Self);*

Regards,
Torsten Bonde Christiansen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20120308/11d12fe6/attachment.html>


More information about the fpc-devel mailing list