mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:40:47 +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
fdfab261a1
commit
953cb48dbe
1 changed files with 3 additions and 1 deletions
|
@ -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];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue