IndentedTextWriter tw = new IndentedTextWriter(internalTW, ' ');
Object referenced by ‘tw’ is lost, but related resources are not disposed here ‘TW ‘ is a text writer where internalTW is a TextWriter
OleDbConnection con = new OleDbConnection(conStr); OleDbCommand cmd = new OleDbCommand(cmd1, con);
object referenced by ‘cmd’ is lost, but related resources are not disposed here
Try
resp.
At the end of the
usingblock,Dispose()is called on the objects and the resources should be freed…