• 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: Problem with an NSWindowController's retain count
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with an NSWindowController's retain count


  • Subject: Re: Problem with an NSWindowController's retain count
  • From: Will Mason <email@hidden>
  • Date: Tue, 19 Jul 2005 13:40:42 -0700 (PDT)

> Here's my -[WSAppDelegate viewerWindowControllers] method:
>
> - (NSMutableArray *)viewerWindowControllers {
>      if (viewerWindowControllers == nil) {
>          viewerWindowControllers = [[NSMutableArray alloc] init];
>      }
>      return [viewerWindowControllers autorelease];
> }

This is your problem. The last line of this method should either be:

return viewerWindowControllers;

Or:

return [[viewerWindowControllers retain] autorelease];

You're overreleasing it.

Good luck,
Will
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Problem with an NSWindowController's retain count
      • From: Ben Kazez <email@hidden>
References: 
 >Problem with an NSWindowController's retain count (From: Ben Kazez <email@hidden>)

  • Prev by Date: Re: webloc drag-and-drop
  • Next by Date: Help with error while loading nib
  • Previous by thread: Problem with an NSWindowController's retain count
  • Next by thread: Re: Problem with an NSWindowController's retain count
  • Index(es):
    • Date
    • Thread