From 58f4907575d298afdf7c3caefef2f29d5945b350 Mon Sep 17 00:00:00 2001 From: John Estropia Date: Tue, 6 Sep 2016 11:13:16 +0900 Subject: [PATCH 1/2] Prevent retain cycles in NSManagedObjectContext (fixes #87) --- Sources/Info.plist | 2 +- Sources/Internal/NotificationObserver.swift | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Sources/Info.plist b/Sources/Info.plist index 0de69c1..241ef86 100644 --- a/Sources/Info.plist +++ b/Sources/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.0.3 + 2.0.4 CFBundleSignature ???? CFBundleVersion diff --git a/Sources/Internal/NotificationObserver.swift b/Sources/Internal/NotificationObserver.swift index b1ca9c1..460bc73 100644 --- a/Sources/Internal/NotificationObserver.swift +++ b/Sources/Internal/NotificationObserver.swift @@ -32,14 +32,10 @@ internal final class NotificationObserver { // MARK: Public - let notificationName: String - let object: AnyObject? let observer: NSObjectProtocol init(notificationName: String, object: AnyObject?, queue: NSOperationQueue? = nil, closure: (note: NSNotification) -> Void) { - self.notificationName = notificationName - self.object = object self.observer = NSNotificationCenter.defaultCenter().addObserverForName( notificationName, object: object, @@ -50,10 +46,6 @@ internal final class NotificationObserver { deinit { - NSNotificationCenter.defaultCenter().removeObserver( - self.observer, - name: self.notificationName, - object: self.object - ) + NSNotificationCenter.defaultCenter().removeObserver(self.observer) } } From ed0fdc76fea45bb6b6d3830fac7c0f2f5eeaf8f1 Mon Sep 17 00:00:00 2001 From: John Estropia Date: Tue, 6 Sep 2016 11:19:38 +0900 Subject: [PATCH 2/2] update podspec --- CoreStore.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CoreStore.podspec b/CoreStore.podspec index dd137c4..7c1fbed 100644 --- a/CoreStore.podspec +++ b/CoreStore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "CoreStore" - s.version = "2.0.3" + s.version = "2.0.4" s.license = "MIT" s.summary = "Unleashing the real power of Core Data with the elegance and safety of Swift" s.homepage = "https://github.com/JohnEstropia/CoreStore"