• 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: EXC-BAD-ACCESS bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EXC-BAD-ACCESS bug


  • Subject: Re: EXC-BAD-ACCESS bug
  • From: Joar Wingfors <email@hidden>
  • Date: Tue, 27 Feb 2007 10:42:21 +0100


On Feb 27, 2007, at 10:25 AM, email@hidden wrote:

NSArray *fileTypes = [NSArray
arrayWithObjects:@"david_Hardy2",@"txt",@"text",@"rtf",@"rtfd",@"htm", @"html",@"webarchive",nil];
GGOpenPanel *oPanel = (GGOpenPanel*) [GGOpenPanel openPanel];


    [oPanel again];
    result = [oPanel runModalForTypes:fileTypes];
	[fileTypes release];

At the last row quoted above you're releasing an object that you shouldn't. You must not send release to objects unless you have previously increased their retain count via calls to retain, alloc, copy, new, etc.
See the memory management documentation for a better and more detailed description of how this works.


j o a r


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >EXC-BAD-ACCESS bug (From: email@hidden)

  • Prev by Date: document window appears very briefly
  • Next by Date: Re: document window appears very briefly
  • Previous by thread: EXC-BAD-ACCESS bug
  • Next by thread: Re: EXC-BAD-ACCESS bug
  • Index(es):
    • Date
    • Thread