title: Core Data deleteObject: not working?
body: <p>I'm using the following code:</p>
  
  <pre><code>+(void)deleteObject:(NSManagedObjectID*)oId {
  NSError *error;
  DFAppDelegate *temp = [DFAppDelegate new];
  NSManagedObjectContext *context = [temp managedObjectContext];
  NSManagedObject *obj = [context existingObjectWithID:oId error:&amp;error];
  [context deleteObject:obj];
  }
  </code></pre>
  
  <p>But it doesn't seem to work accordingly. When I restart my application on iOS simulator I can see the object again in the list.
  I've tried to print the object with the given object id and it is returning the correct object but still the object is not deleted permanently form my core data model.
  None of my entity is in relationship with another entity.</p>
  
  <p>Can anyone explain me what's going wrong?</p>
  
  <p>Thanks.</p>
  
  <p>EDIT:
  I've checked for error, but it shows no error.</p>