Jump to content

About Application DataModule


eelias

Recommended Posts

Hi there,

 

I have a TDataModule, created as Application DataModule by wizard.

 

It works fine, there are many tables there.

 

However I dont see it getting destroyed.

 

Everytime the application needs it I use the function created automatically:

 

function DMMainG: TDMMainG;
begin
  Result := TDMMainG(UniMainModule.GetModuleInstance(TDMMainG));
end;
 

And I see it reuses the same instance first created.

 

That is ok.

 

However if the session is terminated I dont see it getting destroyed. I have put a breakpoint on the destructor and even messages and it remain there.

 

I am trying to find memory leaks on my application, because it is using each time more memory.

 

I have tried to use Free Datamodule, but it just crashes the application. I am used to deal with it for many years on normal Delphi apps. I cannot use on the MainModule because I have a different set of tables, and according with the setup of the application I will use one or another DataModule.

 

Please, I wonder if someone had any experience with it and could give me a direction.

 

Thank you !

 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...