CodeTools: memory leak in hint window
Original Reporter info from Mantis: kluug.net @onpok
-
Reporter name: Ondrej Pokorny
Original Reporter info from Mantis: kluug.net @onpok
- Reporter name: Ondrej Pokorny
Description:
Lazarus IDE is leaking memory in the CodeTools hint window.
Steps to reproduce:
See the attached image that points to the hint window that leaks memory.
Basically do:
1.) Start identifier completion (Control+Space).
2.) Wait until the identifier hint window is show.
3.) Exit Lazarus IDE. You'll get a heaptrc message about memory leaks.
Additional information:
Patch attached.
The problem was that TFPDocHintProvider.FHTMLControl was created without an owner and was not destroyed manually either. See line with
FHTMLControl:=CreateIDEHTMLControl(nil,FHTMLProvider);
It has to be created with an owner assigned or it has to be destroyed manually in TFPDocHintProvider.Destroy (this is what the patch does).
Mantis conversion info:
- Mantis ID: 28616
- Fixed in revision: 49749 (#5bd55e80)