From 315fda705e75f3937085c8badc24a8275818c74a Mon Sep 17 00:00:00 2001 From: Laurent Date: Mon, 29 Apr 2024 15:53:06 +0200 Subject: [PATCH] cleanup objects in memory when reseting --- LeStorage/StoredCollection.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/LeStorage/StoredCollection.swift b/LeStorage/StoredCollection.swift index 87622c0..8ec2c94 100644 --- a/LeStorage/StoredCollection.swift +++ b/LeStorage/StoredCollection.swift @@ -307,6 +307,7 @@ public class StoredCollection: RandomAccessCollection, SomeCollecti } func reset() { + self.items.removeAll() try? FileUtils.removeFileFromDocumentDirectory(fileName: T.fileName()) if let apiCallsCollection = self.apiCallsCollection { apiCallsCollection.reset()