[Lazarus] TSynEdit bug in destructor?
nc-gaertnma at netcologne.de
Tue Nov 8 17:00:20 CET 2011
Bart <bartjunk64 at gmail.com> hat am 8. November 2011 um 16:39 geschrieben:
> If you run the program and press the Free button, the TSynEdit gets freed OK.
> If however you press Ctrl+F4 and at that moment the TSynEdit has
> focus, then you get a warning when freeing the TSynEdit:
> WARNING: TLCLComponent.Destroy with LCLRefCount>0. Hint: Maybe the component
> processing an event?
You should not free components while they process events.
This will free the component after the event.
> This happened to me in an app where I create TSynEdits derived control
> on a TTabSheet, both created at runtime on a custom TPageControl
> derived control.
> It took me all afternoon to find out I hadn't screwed up the
> constructor/destructors of my own controls, and it only happened via
> the shortcut-key when the TSynEdit had focus.
> Feauture or bug?
By design. You should not free something that is in use.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus