Jump to content

About Application DataModule


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;
  Result := TDMMainG(UniMainModule.GetModuleInstance(TDMMainG));

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...