Correct retain/release issues in NSScrollView and NSWindowController.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26799 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2008-08-02 17:34:04 +00:00
parent 99fc2cf864
commit fb69a9fd22
3 changed files with 25 additions and 11 deletions

View file

@ -254,6 +254,14 @@ static float scrollerWidth;
{
_contentView = nil;
}
if (aView == _headerClipView)
{
_headerClipView = nil;
}
if (aView == _cornerView)
{
_cornerView = nil;
}
[super removeSubview: aView];
}
@ -1511,12 +1519,7 @@ static float scrollerWidth;
[content setFrame: frame];
}
// FIXME: No idea what is going on here.
// retain the view and reset the content view...
RETAIN(content);
[self setContentView: content];
RELEASE(content);
ASSIGN(_contentView, content);
}
if (hScroller != nil && _hasHorizScroller)
@ -1533,8 +1536,7 @@ static float scrollerWidth;
{
_hasHeaderView = YES;
_hasCornerView = YES;
ASSIGN(_headerClipView,
[aDecoder decodeObjectForKey: @"NSHeaderClipView"]);
_headerClipView = [aDecoder decodeObjectForKey: @"NSHeaderClipView"];
}
[self tile];
@ -1543,7 +1545,7 @@ static float scrollerWidth;
{
int version = [aDecoder versionForClassName: @"NSScrollView"];
NSDebugLLog(@"NSScrollView", @"NSScrollView: start decoding\n");
[aDecoder decodeValueOfObjCType: @encode(id) at: &_contentView];
_contentView = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(NSBorderType) at: &_borderType];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_scrollsDynamically];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_rulersVisible];
@ -1572,7 +1574,7 @@ static float scrollerWidth;
{
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasHeaderView];
if (_hasHeaderView)
[aDecoder decodeValueOfObjCType: @encode(id) at: &_headerClipView];
_headerClipView = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasCornerView];
}