Switch JumpcutClipping retain/release code to all use the same technique, that being to not release until after being assigned out of need.

This commit is contained in:
Mark Jerde 2016-01-15 22:59:43 -06:00
parent a2d0e2a1a6
commit 0b204c32c3

View file

@ -93,17 +93,19 @@
-(void) setContents:(NSString *)newContents -(void) setContents:(NSString *)newContents
{ {
id old = clipContents;
[newContents retain]; [newContents retain];
[clipContents release];
clipContents = newContents; clipContents = newContents;
[old release];
[self resetDisplayString]; [self resetDisplayString];
} }
-(void) setType:(NSString *)newType -(void) setType:(NSString *)newType
{ {
id old = clipType;
[newType retain]; [newType retain];
[clipType release];
clipType = newType; clipType = newType;
[old release];
} }
-(void) setDisplayLength:(int)newDisplayLength -(void) setDisplayLength:(int)newDisplayLength