[Lazarus] RFH: AV when deleting TAChart from the form

Martin lazarus at mfriebe.de
Sun Apr 11 16:26:36 CEST 2010


On 11/04/2010 15:19, Alexander Klenin wrote:
> On Mon, Apr 12, 2010 at 01:07, Martin<lazarus at mfriebe.de>  wrote:
>
> That is all true, but did you notice what I wrote in "Additional info":
>    
>> Note how TChart.GetChildren is called after TChart.Destroy
>>      
> Does your analysis confirm that?
>    

Yes and No

It is called during Destroy. Somewhere in the inherited classes.

---------------------
what needs to be done, is that any TComponent, that:
- has other TComponents
- and offers them through a property (published, public, private, any) 
(or even just stores it in a memebr-var)

must request a FreeNotification
=> so it can clear the variable/property if the component is destroyed

There may be exception, but that is the save way

Martin





More information about the Lazarus mailing list