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.

Post Reply
Rockiman
Posts: 6
Joined: Wed Jun 06, 2018 12:11 pm

Memory leak in ProcessMessageReceived procedure.

Post 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?
User avatar
salvadordf
Posts: 4086
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Memory leak in ProcessMessageReceived procedure.

Post by salvadordf »

Thanks for reporting the issue!!!! :D

I'll take a look as soon as I can.
User avatar
salvadordf
Posts: 4086
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Memory leak in ProcessMessageReceived procedure.

Post 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.
Rockiman
Posts: 6
Joined: Wed Jun 06, 2018 12:11 pm

Re: Memory leak in ProcessMessageReceived procedure.

Post 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.
Post Reply