• 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
Leaks with savepanel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Leaks with savepanel


  • Subject: Leaks with savepanel
  • From: "Mr. Gecko" <email@hidden>
  • Date: Tue, 18 Mar 2008 17:49:05 -0500

I don't see where the leak is but there is a leak in this code.
mainWindow.h
#import <Cocoa/Cocoa.h>

@interface mainWindow : NSObject {
}
- (IBAction)button:(id)sender;
@end

mainWindow.m
#import "mainWindow.h"

@implementation mainWindow
- (IBAction)button:(id)sender {
	NSSavePanel *panel = [NSSavePanel savePanel];
	[panel setTitle:NSLocalizedString(@"save", @"save panel")];
	[panel setPrompt:NSLocalizedString(@"save", @"save panel")];
	[panel setTreatsFilePackagesAsDirectories:NO];
	[panel setRequiredFileType:@"rtf"];
	[panel runModal];
}
@end
Here is the out put of Instruments
Self%	Self Size	Address		Leaked Object
30.7	64B			0x1aeab0	NSCFString
23		48B			0x1aeb10	GeneralBlock-48
15.3	32B			0x1adc20	NSCFString
15.3	32B			0x1adfb0	NSCFArray
15.3	32B			0x1aeb40	NSCFSting
Note that I am new to cocoa and instruments.
_______________________________________________

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: Leaks with savepanel
      • From: "Rob Napier" <email@hidden>
  • Prev by Date: Re: Cocoa-dev Digest, Vol 5, Issue 430
  • Next by Date: Re: Equivalent to Carbon's TransitionWindow(); using genie when opening an NSWindow
  • Previous by thread: Re: Cocoa-dev Digest, Vol 5, Issue 430
  • Next by thread: Re: Leaks with savepanel
  • Index(es):
    • Date
    • Thread