Throughout the day the application memory usage "from WTM" is increasing up to reaching 800Mb.
I know that the memory usage shown by Task Manager should be look at very slighty as it is very not accurate.
This situation is what brought me to download you very nice application "after reading user comments on different forums".
After executing my application with .NET profiler and opening / closing different form your application seems to suggest that the objects of a form are never released from the memory when the form is closing.
Ex: I have a form that allow the user to do batch of update of 150 records ... throughout the batch 4 query are executed for each records which adds up to 600 live instance. but even when i close the batch form those 150 records are still there altough that function takes only 1.2Mb live bytes. Im very convinced that the components are disposed especially when the form is closing but yet your application seems to say the contrary.
Is it possible that someone could have a look at the log file and maybe give me a hint about how to interpret the data.
I zipped the file to 25Mbit and can easily find a free storage place to put it.
SciTech Software AB
The file is locate on a temporary file host that will keep it for 14 days.
https://www.yousendit.com/download/cEd2 ... bVZjR0E9PQ
To explain the snapshot that I took,
#1 has only my main form loaded, that one is released on the application exit.
#2 i opened a form that has a datagrid with a list of order "about 650" and i selected 150 of them.
#3 i clicked on the button to ship those 150 orders, it opens a new form that shows the first order the 149 other are in queue.
#4 I clicked on the button to process the 150 records, each of them go through different function before being shipped.
#5 I closed the shipping window thus returning to the order form that was never closed, no refresh was done on the datagrid info yet neither to remove the 150 orders.
I think that's pretty much it.
p.s this application was converted from vb6 to .net using a 3rd party software "artinsoft" which is still used mainly to create to get data from the database.
I do know tho that for those specific form the objects are closed and disposed +set to nothing when not used.
Thank you for you help in advance.
#3 After the button to ship the item was press, the new shipping window is open at that time with the 150 records. "the order form is still open".
#4 After the modification for the 150 records were applied, still in the shipping window.
#5 Shipping form is closed, back to the order form "the order form was never closed nor refresh through the steps 2 to 5".
Anyway, when comparing snapshot 2 and 5, the top issue presenter by the memory analyser is: "Disposed instance with direct EventHandler roots". This issue is often an indication of a memory leak caused by a forgotten EventHandler. In this case the class ADORecordSetHelper has a lot of disposed instances that are kept alive by the SQLConnection.StateChanged event. Actually all ADORecordSetHelper instances have the same shortest root path:
Code: Select all
System.Data.StateChangeEventHandler._target System.Object.[...] System.Data.StateChangeEventHandler._invocationList System.Data.SqlClient.SqlConnection._stateChangeEventHandler TOFU.clsDB.mConDB TOFU.modGlobal.DBconn
Code: Select all
Artinsoft.VB6.DB!Artinsoft.VB6.DB.ADO.ADORecordSetHelper.set_ActiveConnection( DbConnection ) ADORecordSetHelper.cs Artinsoft.VB6.DB!Artinsoft.VB6.DB.RecordSetHelper.Open( bool ) RecordSetHelper.cs Artinsoft.VB6.DB!Artinsoft.VB6.DB.ADO.ADORecordSetHelper.Open( bool ) ADORecordSetHelper.cs Artinsoft.VB6.DB!Artinsoft.VB6.DB.RecordSetHelper.Open() RecordSetHelper.cs Artinsoft.VB6.DB!Artinsoft.VB6.DB.ADO.ADORecordSetHelper.Open( LockTypeEnum ) ADORecordSetHelper.cs Artinsoft.VB6.DB!Artinsoft.VB6.DB.ADO.ADORecordSetHelper.Open( DbCommand,LockTypeEnum ) ADORecordSetHelper.cs TOFU!TOFU.clsDB.ExecQuery( string,LockTypeEnum,CursorLocationEnum ) clsDB.vb TOFU!TOFU.frmOrdersListing.LoadOrders() frmOrdersListing.vb [Truncated]
After re-reading your post, I realized that ADORecordSetHelper is not developed by you, which makes it a bit harder to make sure that the event handler is correctly removed. Hopefully you can contact ArtinSoft so that they can correct the issue, otherwise you might have to solve it using reflection.
SciTech Software AB
Thankyou for your reply again,
This would explain why the memory usage keeps increasing when the user keep calling the form.
RecordsetHelper is indeed a third party software, but one of the requirement to use it was to have access to the source code instead of a dll library so that we can modify everything.
After i started to use your application i checked to make sure that the recordset were indeed closed, disposed and set to nothing "in vb debugger" and it look like it was so i figured the memory should have been disposed but never tough i had to check something else around it as it clearly was disposed to me.
I will look around the new information your brought to light and keep you update.
Again thank you very much for your help.
Users browsing this forum: Bing [Bot] and 10 guests