diff --git a/podcasts/ThreadSafeDictionary.swift b/podcasts/ThreadSafeDictionary.swift index ac7f8c819d..0c33ace59e 100644 --- a/podcasts/ThreadSafeDictionary.swift +++ b/podcasts/ThreadSafeDictionary.swift @@ -1,3 +1,5 @@ +import PocketCastsUtils + class ThreadSafeDictionary { private let queue: DispatchQueue @@ -9,9 +11,9 @@ class ThreadSafeDictionary { deinit { //ensure that all work is done before releasing the table - queue.sync(flags: .barrier) { [weak self] in + queue.async(flags: .barrier) { [table] in //Last work item - self?.table.removeAll() + FileLog.shared.console("Dealocating table with \(table.count) elements") } }