Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Memory leak in ProcessMessageReceived procedure.
Memory leak in ProcessMessageReceived procedure.
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?
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Memory leak in ProcessMessageReceived procedure.
Thanks for reporting the issue!!!!
I'll take a look as soon as I can.

I'll take a look as soon as I can.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Memory leak in ProcessMessageReceived procedure.
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.
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.
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.
