Last version of RO/DA and memory leak

Hi

I am creating a new project with DA for Delphi (10.4 and last release of RO/DA/HY) and I have created a whole series of packages to be able to use Hydra. I use custom packages and not standard packages

By compiling and running the application with FastMM5 the following memory leak is raised:

image

The application currently has no defined services but only the ServerDatamodule with the DB access settings

Any idea?

Another info.

A design time this is my ServerDatamodule:

image

If I delete the ConnectionManager component the memory leak not more occour.

Thank you very much

This is a regression in the latest build, compared to 1481?

Unfortunately Eugene is off on well-deserved vacation this week, i’m afraid this will have to wait til next week for him to have a look at. I’ll log an issue.

1 Like

Thanks, logged as bugs://84739

don’t worry Marc. I’m in development, so it’s not an urgent thing for me.

To verify the problem, just compile the server with the runtime packages and FastMM4/5 or simply use ReportMemoryLeaksOnShutdown := True;

Thank you very much and Best Regards

1 Like

@mh believe it is because im using 1481 and dont see any memory leaks .

@claudio.piffer See theres a new fastMM5 library. Which was your experience with this one? Works out of the box for a project working fine with fm4?

Best regards.

Hi DonaldShimoda

I corrected my message. The memory leak is also raised with FastMM4 and even if active only ReportMemoryLeaksOnShutdown := True.

II have not tried with version 1481 but I try to install it.

Thank’s and Best Regards

@mh I installed the .1481 version and the memory leak still occurs

image

I open the standard sample of Hydra “RemObjects SDK Services”. I add the component TConnectionManager and add ReportMemoryLeaksOnShutdown := True;

I run it and when close the memory leak occurs.

1 Like

Sorry, i misunderstood. Is Hydra related then.

Best regards.

Hi DonaldShimoda

It’s not a Hydra problem. The memory leak occurs only if you compile the project with the runtime package. If I compile without runtime package no memory leak occurs.

The problem is in the ConnectionManager class and specifically in connection poll management. Here a TROThreadTimer is used which for some reason with the run-time packages is not released correctly when you close the app

Best Regard

1 Like

Ok, is clear now. Im not using runtime packages.

Best regards.

1 Like

Hi,

this is known behavior with run-time packages and threads.
pls read more at DllMain Thread Deinitialization article.

bugs://84739 got closed with status notfixable.

Hi EvgenyK

many thank for your answer. Ok I understand the problem.

I have however seen that it is a “limited” problem as it refers to a global object (ConnectionManager) and from some tests that I have carried out it is not a problem that grows over time

Best Regards

Hi,

as a workaround, you can put ConnectionManager to host and pass it as a reference to plugins. it should completely eliminate this issue.

Hi EvgenyK

which is exactly what I will do. I will define a shared interface where I will share objects with plugins including the ConnectionManager.

Consider that the memory leak today comes out even if I don’t load any plugins but only for the fact that I have enabled the compilation with the runtime packages, so I doubt that the problem will be solved

Best Regards