TFBEventMonitor lazarus / 16-Databases ---------------------------------------------------------------------- Jose Ignacio · 2016-06-03 10:00 In a program using TFBEventMonitor,  the process of the program do not ends when I close the Main window. They remain in the task manager. Not everytimes. If I make my proper class myTFBEEvent monitor and change the line 346: FEventsThread.FreeOnterminate:= True; to FEventsThread.FreeOnterminate:= False; the problem disappears. But then the "leaks and traces" detect memory leaks. Some idea... ? Sorry for my English.. ---------------------------------------------------------------------- Thaddy · 2016-06-03 10:08 Can you provide us with a small compilable example program that reproduces the issue? ---------------------------------------------------------------------- Jose Ignacio · 2016-06-03 13:17 I think this is an example for that. I do repeat doublé-click in icon of run program and esc for terminate program, with the program manager open for to see. In 15 or 20 esteps or more... the CPU time of the "prueba" process goes to 99 and do not ends. If you recompile an use myfeventmonitor the prueba procces end normally everytime... ---------------------------------------------------------------------- ttomas · 2016-06-05 19:48 TFBEventMonitor use TThread for events notiication. Try Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TFPrueba.FormDestroy(Sender: TObject);begin  evm.UnRegisterEvents;  evm.Free;   // <<<<