[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:
Fred Kiefer 2001-01-08 01:04:58 +00:00
parent b8a41ef24a
commit 47c5ba9a64

View file

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