From 5bcee28730f291f095dcdf56db2d1b720ccdea1e Mon Sep 17 00:00:00 2001 From: Max Bothe Date: Tue, 26 Oct 2021 14:06:47 +0200 Subject: [PATCH] Avoid reference cycle caused by empty state configuration --- iOS/Extensions/EmptyState/EmptyState.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iOS/Extensions/EmptyState/EmptyState.swift b/iOS/Extensions/EmptyState/EmptyState.swift index e01c0d4c3..f18893afb 100644 --- a/iOS/Extensions/EmptyState/EmptyState.swift +++ b/iOS/Extensions/EmptyState/EmptyState.swift @@ -66,7 +66,7 @@ extension EmptyStateProtocol { } set { if let newValue = newValue { - objc_setAssociatedObject(self, &AssociatedKeys.emptyStateDelegate, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) + objc_setAssociatedObject(self, &AssociatedKeys.emptyStateDelegate, newValue, .OBJC_ASSOCIATION_ASSIGN) } } } @@ -78,7 +78,7 @@ extension EmptyStateProtocol { } set { if let newValue = newValue { - objc_setAssociatedObject(self, &AssociatedKeys.emptyStateDataSource, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) + objc_setAssociatedObject(self, &AssociatedKeys.emptyStateDataSource, newValue, .OBJC_ASSOCIATION_ASSIGN) self.reloadEmptyState() } }