Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #22 from nvie/master
This is just a simple fix to prevent unintentional releases of the default MOC.
  • Loading branch information
casademora committed May 12, 2011
2 parents ba8609c + 8d9e636 commit 4c16b37
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions NSManagedObjectContext+ActiveRecord.m
Expand Up @@ -30,8 +30,10 @@ + (NSManagedObjectContext *)defaultContext


+ (void) setDefaultContext:(NSManagedObjectContext *)moc + (void) setDefaultContext:(NSManagedObjectContext *)moc
{ {
[defaultManageObjectContext release]; if (defaultManageObjectContext != moc) {
defaultManageObjectContext = [moc retain]; [defaultManageObjectContext release];
defaultManageObjectContext = [moc retain];
}
} }


+ (void) resetDefaultContext + (void) resetDefaultContext
Expand Down

0 comments on commit 4c16b37

Please sign in to comment.