* Clean up the collection by stopping sync and clearing data * This can be called manually or automatically by garbage collection
()
| 1421 | * This can be called manually or automatically by garbage collection |
| 1422 | */ |
| 1423 | public cleanup(): void { |
| 1424 | this.syncedData.clear() |
| 1425 | this.syncedMetadata.clear() |
| 1426 | this.syncedCollectionMetadata.clear() |
| 1427 | this.optimisticUpserts.clear() |
| 1428 | this.optimisticDeletes.clear() |
| 1429 | this.pendingOptimisticUpserts.clear() |
| 1430 | this.pendingOptimisticDeletes.clear() |
| 1431 | this.pendingOptimisticDirectUpserts.clear() |
| 1432 | this.pendingOptimisticDirectDeletes.clear() |
| 1433 | this.clearOriginTrackingState() |
| 1434 | this.isLocalOnly = false |
| 1435 | this.size = 0 |
| 1436 | this.pendingSyncedTransactions = [] |
| 1437 | this.syncedKeys.clear() |
| 1438 | this.hasReceivedFirstCommit = false |
| 1439 | } |
| 1440 | } |
nothing calls this directly
no test coverage detected