예제 #1
0
 /// <summary>
 /// 释放占用的资源。
 /// </summary>
 /// <param name="disposing"></param>
 protected virtual void Dispose(bool disposing)
 {
     if (!disposing)
     {
         return;
     }
     if (_disposed)
     {
         return;
     }
     if (_vars != null)
     {
         _vars.Clear();
         _vars = null;
     }
     if (_dataContext != null)
     {
         _dataContext.Dispose();
         _dataContext = null;
     }
     _databaseName = null;
     if (_log != null)
     {
         _log.Dispose();
         _log = null;
     }
     GC.SuppressFinalize(this);
     _disposed = true;
 }
예제 #2
0
 /// <summary>
 /// 释放对象占用的所有资源。
 /// </summary>
 public virtual void Dispose()
 {
     _tableName = null;
     _removedFields?.Clear();
     _removedFields = null;
     _fields?.Clear();
     _fields      = null;
     _dataContext = null;
 }