Reputation: 6244
DataSet
.DataSet
is not releasing memory!How Can I Fix this problem?
Upvotes: 1
Views: 2524
Reputation: 4187
First of all make sure there is no reference to your data set, also make sure after you are done with the dataset you call the dispose method (or put your data set in a using block)
Upvotes: 1
Reputation: 5340
It is hard to answer your question as you did not post your code. Perhaps, this memory leak is caused by the fact that this dataSet is referenced on another form or there are event handlers.... To find memory leaks, I would suggest that you try the .NET Memory Profiler. Finally, to explicitly clear the DataSet, use its Dispose method.
Upvotes: 1
Reputation: 887887
You have a live reference to your DataSet.
You need to figure out what is still referencing the DataSet and clear the reference.
Upvotes: 1