{
//實現 IDisposable 接口的Dispose()方法.
public void Dispose()
{
Disposing(true);
GC.SuppressFinalize(this);
protected virtual void Disposing(bool disposing)
{
if (disposing)
{
// 在這裏釋放託管資源.
}
// 在這裏釋放非託管資源.
}
// Finalize 方法或析構函數.
~Base()
{
Dispose (false);
}
}
{
protected override void Disposing(bool disposing)
{
if (disposing)
{
// 在這裏釋放託管資源.
}
// 在這裏釋放非託管資源.
base.Disposing(disposing);
}
~~THE END~~
尹曙光