[Lazarus] TSynEdit bug in destructor?

Lukasz Sokol el.es.cr at gmail.com
Wed Nov 9 13:09:28 CET 2011


On 08/11/2011 16:00, Mattias Gaertner wrote:
>  
[...]
> 
> You should not free components while they process events. 
> 
> Use instead:
> 
> Application.ReleaseComponent(Ed); 
> 
> This will free the component after the event. 
> 
[...]

Thanks! This did the trick for me too (background : my application was invoking
Form1.Close when an '> exit[VK_RETURN]' command was recognized typed in a TMemo which had
the /foreseeable/ effect of the app crashing on exit... This (ReleaseComponent(Memo1) did the trick!

Lukasz


> 
> By design. You should not free something that is in use.
> 

> Mattias





More information about the Lazarus mailing list