You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using SuppressFinalize in class constructors is IMHO erroneous.
This causes Finalizers never to get called.
Classes embracing managed components should rather implement proper Dispose/Finalize logic.
Expampe:
FbConnection con = new FbConnection(cStr);
con.Open();
con = null;
The underlying socket will not be closed because the Finalizer in FbConnectionInternal will never be called.
SuppressFinalize is even sometimes called on classes that have no Finalizer (for example GdsConnection).
The text was updated successfully, but these errors were encountered:
Submitted by: Michał Ziemski (r_o_o_k)
Votes: 2
Using SuppressFinalize in class constructors is IMHO erroneous.
This causes Finalizers never to get called.
Classes embracing managed components should rather implement proper Dispose/Finalize logic.
Expampe:
FbConnection con = new FbConnection(cStr);
con.Open();
con = null;
The underlying socket will not be closed because the Finalizer in FbConnectionInternal will never be called.
SuppressFinalize is even sometimes called on classes that have no Finalizer (for example GdsConnection).
The text was updated successfully, but these errors were encountered: