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); } }
public TAdoDotNetDataTable(string aTableName, VirtualDataTable aCreatedBy, DataTable aData, bool aDataNeedsDispose, DataTable aOriginalTable) : base(aTableName, aCreatedBy) { Data = aData; DataNeedsDispose = aDataNeedsDispose; LookupDataViews = new TLookupCacheList(); OriginalTable = aOriginalTable; }