Re: EXC-BAD-ACCESS bug
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