123456789101112131415161718192021222324 |
- using System;
- public abstract class IDisposableBase : IDisposable
- {
- public virtual void Dispose()
- {
- this.Dispose(true);
- GC.SuppressFinalize(this);
- }
- protected virtual void Dispose(bool is_release_managed_code)
- {
- if (this.is_disposed_)
- {
- return;
- }
- this.DisposeEvent();
- this.is_disposed_ = true;
- }
- protected abstract void DisposeEvent();
- protected bool is_disposed_;
- }
|