Issue #106 added requested change in RKManagedObjectStore.m

This commit is contained in:
Duncan Lewis
2011-06-16 18:47:42 -04:00
parent 718c67039a
commit ed9260abcd

View File

@@ -89,6 +89,11 @@ static NSString* const kRKManagedObjectContextKey = @"RKManagedObjectContext";
_storeFilename = nil;
[_pathToStoreFile release];
_pathToStoreFile = nil;
// Clear the current managed object context. Will be re-created next time it is accessed.
NSMutableDictionary* threadDictionary = [[NSThread currentThread] threadDictionary];
if ([threadDictionary objectForKey:kRKManagedObjectContextKey]) {
[threadDictionary removeObjectForKey:kRKManagedObjectContextKey];
}
[_managedObjectModel release];
_managedObjectModel = nil;
[_persistentStoreCoordinator release];