• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSArrayController - Remove and immediately deallocate objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSArrayController - Remove and immediately deallocate objects
      • From: Graham Cox <email@hidden>
    • Re: NSArrayController - Remove and immediately deallocate objects
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: How to display NSStrokeColorAttributeName on the NSColorPanel
  • Next by Date: Re: NSArrayController - Remove and immediately deallocate objects
  • Previous by thread: Re: Legal Opinion on GCUndoManager
  • Next by thread: Re: NSArrayController - Remove and immediately deallocate objects
  • Index(es):
    • Date
    • Thread