• 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
Re: Garbage Collection Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Garbage Collection Problem


  • Subject: Re: Garbage Collection Problem
  • From: "Clark Cox" <email@hidden>
  • Date: Thu, 10 Jan 2008 13:20:56 -0800

On Jan 10, 2008 8:58 AM, Bill Bumgarner <email@hidden> wrote:
> On Jan 10, 2008, at 1:27 AM, Dent John wrote:
> >> Sorry, couldn't resist te pun. I'm a noob but I heard about this
> >> when Xcode's build settings aren't set properly.
> >
> > Yes – I guess I have to admit to falling victim to the RFTM properly
> > suggestion. Which I admit that I hadn't done recently. Even so, I do
> > think that making NIB objects collectable is quite funny. After all,
> > they are there in the NIB for a good reason!! Still, it is not ours
> > to reason why. :-)
>
> It would have required new API to support some kind of top level
> collection returned by the NIB that, ultimately, would have been a
> waste of memory.
>
> The easiest solution for non-mainmenu NIBs is to create outlets on
> your File's Owner for each of the top level objects (of which there
> are typically few).

Or to load the nib via NSNib, which has the method:

- (BOOL)instantiateNibWithOwner:(id)owner topLevelObjects:(NSArray
**)topLevelObjects;

for just this reason. Pass in a pointer to a variable as the second
parameter, and it will be set to an NSArray containing all such
top-level objects.

--
Clark S. Cox III
email@hidden
_______________________________________________

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

References: 
 >Re: Garbage Collection Problem (From: Jonathan Dann <email@hidden>)
 >Re: Garbage Collection Problem (From: Dent John <email@hidden>)
 >Re: Garbage Collection Problem (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: EXC_BAD_ACCESS when trying to use [NSMutableURLRequest setHTTPBodyStream]
  • Next by Date: Re: NSView viewWillDraw crash
  • Previous by thread: Re: Garbage Collection Problem
  • Next by thread: NSBezierPath to NSImage with subpixel rendering
  • Index(es):
    • Date
    • Thread