mirror of
https://github.com/TermiT/Flycut.git
synced 2025-10-06 20:05:49 +08:00
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:
parent
a2d0e2a1a6
commit
0b204c32c3
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue