Permalink
Browse files

Add method to clear context from thread storage.

  • Loading branch information...
artgillespie committed Jan 30, 2013
1 parent 477049d commit 9b82db445acb958d518f1d4f70b4159b64618118
@@ -12,5 +12,6 @@
+ (NSManagedObjectContext *) MR_contextForCurrentThread;
+ (void) MR_resetContextForCurrentThread;
++ (void) MR_clearContextForCurrentThread;
@end
@@ -38,4 +38,8 @@ + (NSManagedObjectContext *) MR_contextForCurrentThread;
}
}
++ (void) MR_clearContextForCurrentThread {
+ [[[NSThread currentThread] threadDictionary] removeObjectForKey:kMagicalRecordManagedObjectContextKey];
+}
+
@end

0 comments on commit 9b82db4

Please sign in to comment.