[lazarus] win32 interface: CheckListBox memleak.
Micha Nelissen
micha at neli.hopto.org
Fri Dec 19 13:06:47 EST 2003
Vincent Snijders wrote:
> I investigated why sometimes the ItemRecords of a checklistbox aren't
> freeed. What happens is, that the LCL sends a LM_DESTROY message to the
> interface for the checklistbox. The interface removes the Lazarus
> property from the checklistbox window. Therefore when the windows is
> destroyed and the WM_DESTROY message is received, the owner object is
> nil and we don't know what (type) the original lcl object was.
>
> I propose that we remove the line (around line 583 of win32object.inc)
> RemoveProp(Handle, 'Lazarus');
>
> Then when the WM_DESTROY message is received in the windows procedure,
> there is still a owner object.
>
> The Lazarus property will be removed by the enumprops call later in the
> WM_DESTROY handling code.
Good idea, applied.
Thanks,
Micha.
More information about the Lazarus
mailing list