Disposing Data Tables

ALX

Well-known member
Joined
Nov 16, 2005
Messages
253
Location
Columbia, SC
Programming Experience
10+
I'm attempting to clean up some MVC code to make sure no memory leaks exist. I have a few processes where a Controller sends a data table or two to a View in ViewBag so the page can display the data records. At that point, I no longer have Controller access these data tables to dispose them after the fact. I've read a lot conflicting advice about how data tables do not need explicit disposal. Agree or disagree ???
 
I probably find the same as you in search of disposing DataTable. My search also indicate that Controller is disposable, and that you can override Dispose to clean up what is needed, it is called after view is rendered.
 
Back
Top