discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView retain cycle problem


From: Nicola Pero
Subject: Re: NSTextView retain cycle problem
Date: Tue, 19 Feb 2002 12:04:01 +0000 (GMT)

Thanks - brilliant fix!  Applied.

> Hi,
> 
> I've been testing a program of mine (a newsreader; hopefully I'll be
> able to release an early version soon) with double-release checking
> enabled, and have encountered some problems with an NSTextView that's
> being created as a default field editor for a window. Since the
> NSTextView owns the text network it will be released from it's dealloc
> method and its retain count will drop to -1. This causes the
> double-release checking to complain (and it seems like it could also
> trigger an exception in one version of NSDecrementExtraRefCountWasZero).
> 
> Since the NSTextView -dealloc method already guards against recursive
> dealloc (which will never happen since NSDecrementExtraRefCountWasZero
> checks ==0, not <=0), it seems to me that adding 'RETAIN(self);' before
> 'RELEASE(_textStorage);' would fix this problem.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]