From 679839a786bbf89b058fb052a37b760096aa083f Mon Sep 17 00:00:00 2001 From: Dimitri Bouniol Date: Mon, 29 Jul 2024 02:03:13 -0700 Subject: [PATCH] Fixed a retain cycle that could prevent a DiskPersistence from deinitializing when no longer used --- .../Persistence/Disk Persistence/Transaction/Transaction.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/CodableDatastore/Persistence/Disk Persistence/Transaction/Transaction.swift b/Sources/CodableDatastore/Persistence/Disk Persistence/Transaction/Transaction.swift index 777b6ff..d9da288 100644 --- a/Sources/CodableDatastore/Persistence/Disk Persistence/Transaction/Transaction.swift +++ b/Sources/CodableDatastore/Persistence/Disk Persistence/Transaction/Transaction.swift @@ -11,7 +11,7 @@ import Bytes extension DiskPersistence { actor Transaction: AnyDiskTransaction { - let persistence: DiskPersistence + unowned let persistence: DiskPersistence unowned let parent: Transaction? var childTransactions: [Transaction] = []