From 45b04bd21e9266c4d25e9aff01b5486eb512e6b7 Mon Sep 17 00:00:00 2001 From: nico Date: Sat, 16 Dec 2000 20:18:33 +0000 Subject: [PATCH] Retain/release fixes git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8338 72102866-910b-0410-8b05-ffd578937521 --- Source/NSTextContainer.m | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Source/NSTextContainer.m b/Source/NSTextContainer.m index adc27b5ed..449a2da45 100644 --- a/Source/NSTextContainer.m +++ b/Source/NSTextContainer.m @@ -95,9 +95,17 @@ return self; } +- (void) dealloc +{ + RELEASE (_textView); + [super dealloc]; +} + - (void) setLayoutManager: (NSLayoutManager*)aLayoutManager { - ASSIGN(_layoutManager, aLayoutManager); + /* The layout manager owns us - so he retains us and we don't retain + him. */ + _layoutManager = aLayoutManager; } - (NSLayoutManager*) layoutManager @@ -144,7 +152,7 @@ object: _textView]; } - ASSIGN(_textView, aTextView); + ASSIGN (_textView, aTextView); if (aTextView != nil) {