Page 1 of 1
Memory leak in ProcessMessageReceived procedure.
Posted: Mon Jul 23, 2018 8:01 pm
by Rockiman
Hi, I try to use ProcessMessageReceived event. With each procedure call, the process takes more and more memory according to the task manager. The same situation in JSRTTIExtention demo with TJSRTTIExtensionFrm.Chromium1ProcessMessageReceived when I set mouseover event and move the mouse. Is there anything can do about it?
Re: Memory leak in ProcessMessageReceived procedure.
Posted: Tue Jul 24, 2018 12:40 pm
by salvadordf
Thanks for reporting the issue!!!!
I'll take a look as soon as I can.
Re: Memory leak in ProcessMessageReceived procedure.
Posted: Tue Jul 24, 2018 4:32 pm
by salvadordf
Hi again,
I did some more tests and a few minor changes.
I tested the JSExtension and JSRTTIExtension demos registering the mouse event.
I also used FastMM4 to detect leaks but I only could find 2 leaks in "SingleProcess" mode in GlobalCEFApp_OnWebKitInitialized. For some reason TempHandler (TTestExtensionHandler) is not released.
I'll keep looking but if this were a massive leak with every mouse movement I would detect many more leaks (one for every message).
I also noticed that if I stop moving the mouse for a while the memory is partly recovered.
Perhaps this is a memory manager issue.
Re: Memory leak in ProcessMessageReceived procedure.
Posted: Wed Jul 25, 2018 12:48 pm
by Rockiman
Thank you for answer.

In my case I can't see the memory recover if I stop movint the mouse. I think it looks like an implicit memory leak, when objects accumulate in some global list, which is correctly deleted when the process is terminated.