eelias Posted January 10, 2014 Share Posted January 10, 2014 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 ! Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted January 13, 2014 Administrators Share Posted January 13, 2014 All DataModules created by Framework are destroyed when your session is terminated. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.