Permalink
Browse files

Converting to ARC

  • Loading branch information...
1 parent bb04833 commit 93c7e44437d275e17652d939fc842a901d735e83 @stuffmc stuffmc committed Nov 18, 2012
Showing with 3 additions and 40 deletions.
  1. +3 −40 JLNFadingScrollView.m
View
@@ -67,7 +67,7 @@ - (id)initWithFrame:(NSRect)frameRect
_topFadeView = nil;
_bottomFadeView = nil;
_fadeHeight = DEFAULTFADEHEIGHT;
- _fadeColor = [[NSColor blackColor] retain];
+ _fadeColor = [NSColor blackColor];
// Kill copy on scroll
[[self contentView] setCopiesOnScroll:NO];
@@ -77,34 +77,16 @@ - (id)initWithFrame:(NSRect)frameRect
return self;
}
-- (void)dealloc
-{
-
- // iVars
- [_topFadeView release];
- _topFadeView = nil;
- [_bottomFadeView release];
- _bottomFadeView = nil;
- [_fadeColor release];
- _fadeColor = nil;
-
- [super dealloc];
-
-}
-
-
#pragma mark Nib Loading
- (void)awakeFromNib
{
-
// Kill copy on scroll
[[self contentView] setCopiesOnScroll:NO];
// Initial state
_fadeHeight = DEFAULTFADEHEIGHT;
- _fadeColor = [[NSColor blackColor] retain];
-
+ _fadeColor = [NSColor blackColor];
}
@@ -137,7 +119,6 @@ - (void)setFadeColor:(NSColor *)newColor
{
// Swap the colors
- [_fadeColor release];
_fadeColor = [newColor copy];
// Update the fade views
@@ -225,19 +206,6 @@ - (void)tileFadeViews
@implementation JLNFadeView
-
-#pragma mark Constructors / Destructors
-
-- (void)dealloc
-{
- [_fadeColor release];
- _fadeColor = nil;
- [_fadient release];
- _fadient = nil;
- [super dealloc];
-}
-
-
#pragma mark Accessors
@synthesize topDown = _topDown;
@@ -255,13 +223,8 @@ - (void)setFadeColor:(NSColor *)newColor
{
// Swap the color
- [_fadeColor release];
_fadeColor = [newColor copy];
- // Kill the current gradient
- [_fadient release];
- _fadient = nil;
-
// Flag for display
[self setNeedsDisplay:YES];
@@ -277,7 +240,7 @@ - (void)viewWillDraw
// Make sure we have a sane fade color and gradient
if (!_fadeColor)
- _fadeColor = [[NSColor blackColor] retain];
+ _fadeColor = [NSColor blackColor];
if (!_fadient)
_fadient = [[NSGradient alloc] initWithColors:[NSArray arrayWithObjects:
_fadeColor,

0 comments on commit 93c7e44

Please sign in to comment.