NSArrayController - Remove and immediately deallocate objects
NSArrayController - Remove and immediately deallocate objects
- Subject: NSArrayController - Remove and immediately deallocate objects
- From: Leonardo <email@hidden>
- Date: Sat, 01 Feb 2014 19:50:40 +0100
- Thread-topic: NSArrayController - Remove and immediately deallocate objects
Hi, I have created an NSArrayController on IB.
During the runtime, I remove all the objects from this NSArrayController.
The objects get properly removed but they don't get deallocated immediately.
Not even if I use a pool like that:
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSArray *boxes = [mBoxesArrayController arrangedObjects];
[mBoxesArrayController removeObjects:boxes];
[pool release];
At this point the boxes should receive the dealloc message, but they do not
receive that immediately, as I expected. I have been looking for a solution
and found something like
[managedObjectContext processPendingChanges];
But I can't get the managedObjectContext for that NSArrayCOntroller that I
have created on IB. Since I am pretty new at managing NSArrayController, I
would like to know how to do that. Thank you.
Regards
-- Leonardo
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden