Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
Relocation object allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
stkim1 committed Apr 30, 2016
1 parent 6a81a05 commit 6d4d561
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 220 deletions.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
8 changes: 4 additions & 4 deletions MTImageMapView/MTImageMapView.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ -(BOOL)isAreaSelected:(CGPoint)inPointTouch;

#pragma mark Image Map View
@interface MTImageMapView()
@property (atomic, retain) NSMutableArray *mapAreas;
@property (atomic, strong) NSMutableArray *mapAreas;
-(void)_finishConstructionWithImage:(UIImage *)inImage;
-(void)_performHitTestOnArea:(NSValue *)inTouchPoint;

Expand Down Expand Up @@ -112,6 +112,7 @@ -(id)initWithImage:(UIImage *)image
self = [super initWithImage:image];
if(self)
{
self.mapAreas = [NSMutableArray arrayWithCapacity:0];
[self _finishConstructionWithImage:image];
}
return self;
Expand All @@ -122,6 +123,7 @@ -(id)initWithImage:(UIImage *)image highlightedImage:(UIImage *)highlightedImage
self = [super initWithImage:image highlightedImage:highlightedImage];
if(self)
{
self.mapAreas = [NSMutableArray arrayWithCapacity:0];
[self _finishConstructionWithImage:image];
}
return self;
Expand All @@ -132,12 +134,12 @@ -(id)initWithCoder:(NSCoder *)aDecoder
self = [super initWithCoder:aDecoder];
if(self)
{
self.mapAreas = [NSMutableArray arrayWithCapacity:0];
[self _finishConstructionWithImage:self.image];
}
return self;
}


-(void)dealloc
{
#ifdef DEBUG_MAP_AREA
Expand Down Expand Up @@ -227,8 +229,6 @@ -(void)_finishConstructionWithImage:(UIImage *)inImage
UIViewAutoresizingFlexibleHeight) ^ (NSUInteger)(-1);
sizingOption &= sizingFilter;
[self setAutoresizingMask:sizingOption];

self.mapAreas = [NSMutableArray arrayWithCapacity:0];
[self setUserInteractionEnabled:YES];
[self setMultipleTouchEnabled:NO];

Expand Down

0 comments on commit 6d4d561

Please sign in to comment.