mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
[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:
parent
b8a41ef24a
commit
47c5ba9a64
1 changed files with 3 additions and 1 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue