示例#1
0
        protected override void Dispose(bool disposing)
        {
            try
            {
                //only managed resources
                if (disposing)
                {
                    if (DataNeedsDispose && Data != null)
                    {
                        TCompactFramework.DisposeDataTable(Data);
                    }
                    Data = null;

                    foreach (TLookupCache dv in LookupDataViews.Values)
                    {
                        dv.Dispose();
                    }
                    LookupDataViews = null;
                }
            }
            finally
            {
                //last call.
                base.Dispose(disposing);
            }
        }
示例#2
0
 public TAdoDotNetDataTable(string aTableName, VirtualDataTable aCreatedBy, DataTable aData, bool aDataNeedsDispose, DataTable aOriginalTable) : base(aTableName, aCreatedBy)
 {
     Data             = aData;
     DataNeedsDispose = aDataNeedsDispose;
     LookupDataViews  = new TLookupCacheList();
     OriginalTable    = aOriginalTable;
 }