[setTarget:] don't retain target to avoid retain cycle in

NSScrollView. [initWithCoder:] release target after decoding.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8497 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2001-01-08 01:04:58 +00:00
parent fdfab261a1
commit 953cb48dbe

View file

@ -126,7 +126,7 @@ static NSColor *scrollBarColor = nil;
- (void) setTarget: (id)target - (void) setTarget: (id)target
{ {
ASSIGN(_target, target); _target = target;
} }
- (id) target - (id) target
@ -172,6 +172,8 @@ static NSColor *scrollBarColor = nil;
[aDecoder decodeValueOfObjCType: @encode(unsigned int) at: &_arrowsPosition]; [aDecoder decodeValueOfObjCType: @encode(unsigned int) at: &_arrowsPosition];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_isEnabled]; [aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_isEnabled];
[aDecoder decodeValueOfObjCType: @encode(id) at: &_target]; [aDecoder decodeValueOfObjCType: @encode(id) at: &_target];
// Undo RETAIN by decoder
TEST_RELEASE(_target);
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &_action]; [aDecoder decodeValueOfObjCType: @encode(SEL) at: &_action];
[self drawParts]; [self drawParts];