internal void FreeRecord(int record) { Debug.Assert(null != _storage, "no storage"); _storage.Set(record, _storage._nullValue); }
internal void Clear(bool clearAll) { if (clearAll) { for (int record = 0; record < recordCapacity; ++record) { rows[record] = null; } int count = table.columnCollection.Count; for (int i = 0; i < count; ++i) { // SQLBU 415729: Serious performance issue when calling Clear() // this improves performance by caching the column instead of obtaining it for each row DataColumn column = table.columnCollection[i]; for (int record = 0; record < recordCapacity; ++record) { column.FreeRecord(record); } } lastFreeRecord = 0; freeRecordList.Clear(); } else // just clear attached rows { freeRecordList.Capacity = freeRecordList.Count + table.Rows.Count; for (int record = 0; record < recordCapacity; ++record) { if (rows[record] != null && rows[record].rowID != -1) { int tempRecord = record; FreeRecord(ref tempRecord); } } } }