M
Mark Rae
I have a destructor in my base class that is supposed to close a database
connection when class is released.
~BaseTable()
{
this.Conn.Close();
}
However, connection is never closed. It doesn't appear destructor is
firing. Why?
1) After you've finished with the instance of the class, are you setting it
to null? If so, and nothing else is using it, the GC should collect it,
causing your destructor to fire...