I execute a fetch request and i'm eventually getting the managed object . The managed object gets deleted on using [managedObj deleteObject:file]
which does not appear in further fetch request . But file remains in the memory .
I did the following [managedObj deleteObject:file]
to delete the managed object .
[[NSFileManager defaultManager] removeItemAtPath:filePath error:&error]
to delete the file from internal memory.