0

Right not were trying to improve our system because we have memory leaks in our application. Im wondering what will happen if i created a DataTable object that i left undisposed then redirect to another page?

Will the DataTable object be garbage collected or not? (ASP WEBFORMS) thank you for your help :)

zxc
  • 1,504
  • 3
  • 13
  • 32

1 Answers1

0

I don't think you should worry about disposing DataTable, as per page life cycle the page object is disposed after unload event.

Additionally, DataTable is a managed object, so calling dispose manually will yield less benefit. Read below.

Should I Dispose() DataSet and DataTable?

Community
  • 1
  • 1
Shivendra
  • 159
  • 1
  • 7