diff --git a/Source/DBPrefsWindowController.m b/Source/DBPrefsWindowController.m index c67c415..7cf09b6 100644 --- a/Source/DBPrefsWindowController.m +++ b/Source/DBPrefsWindowController.m @@ -74,14 +74,14 @@ - (void)windowDidLoad // Create a new window to display the preference views. // If the developer attached a window to this controller // in Interface Builder, it gets replaced with this one. - NSWindow *window = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,1000,1000) + NSWindow *window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,1000,1000) styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask) backing:NSBackingStoreBuffered - defer:YES] autorelease]; + defer:YES]; [self setWindow:window]; - contentSubview = [[[NSView alloc] initWithFrame:[[[self window] contentView] frame]] autorelease]; + contentSubview = [[NSView alloc] initWithFrame:[[[self window] contentView] frame]]; [contentSubview setAutoresizingMask:(NSViewMinYMargin | NSViewWidthSizable)]; [[[self window] contentView] addSubview:contentSubview]; [[self window] setShowsToolbarButton:NO]; @@ -90,17 +90,6 @@ - (void)windowDidLoad -- (void) dealloc { - [toolbarIdentifiers release]; - [toolbarViews release]; - [toolbarItems release]; - [viewAnimation release]; - [super dealloc]; -} - - - - #pragma mark - #pragma mark Configuration @@ -129,12 +118,12 @@ - (void)addView:(NSView *)view label:(NSString *)label image:(NSImage *)image NSAssert (view != nil, @"Attempted to add a nil view when calling -addView:label:image:."); - NSString *identifier = [[label copy] autorelease]; + NSString *identifier = [label copy]; [toolbarIdentifiers addObject:identifier]; [toolbarViews setObject:view forKey:identifier]; - NSToolbarItem *item = [[[NSToolbarItem alloc] initWithItemIdentifier:identifier] autorelease]; + NSToolbarItem *item = [[NSToolbarItem alloc] initWithItemIdentifier:identifier]; [item setLabel:label]; [item setImage:image]; [item setTarget:self]; @@ -208,7 +197,6 @@ - (IBAction)showWindow:(id)sender [toolbar setDisplayMode:NSToolbarDisplayModeIconAndLabel]; [toolbar setDelegate:(id)self]; [[self window] setToolbar:toolbar]; - [toolbar release]; } NSString *firstIdentifier = [toolbarIdentifiers objectAtIndex:0];