问题
If I create a new Custom Object in Core Date (using Magical Record) like so
List *list = [List MR_createInContext:_managedObjectContext];
And then I perform various actions on it, such as setting its name
list.name = @"Foobar List";
But then the user decides to cancel the creation of this list, do I need to delete? As in, is this list already in memory even though I haven't saved the local context with [localContext MR_save];
回答1:
If you create the object in the managed object context, it will get saved the next time you save changes. If you don't want to save it, you'll have to delete it.
来源:https://stackoverflow.com/questions/17801648/destroying-an-object-in-core-data-before-its-saved