bug-gnustep
[Top][All Lists]
Advanced

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

Re: NSTimer


From: Richard Frith-Macdonald
Subject: Re: NSTimer
Date: Mon, 17 Jun 2002 07:47:11 +0100

On Sunday, June 16, 2002, at 10:12 PM, Andy Ruder wrote:

Shouldn't NSTimer retain its instance variables such as _target and _info? It
seems odd that it wouldn't.  For example, just to use the userInfo of a
NSTimer, you would have to retain the dictionary before initializing the timer,
and then make sure the info is released once again after the timer is
deallocated. Seems a bit strange. Anyways, the patch attached should fix this
bug if you should choose that it is a bug.

Thanks for the report.
I didn't apply your patch, but checked the behavior on MacOS-X and made GNUstep
behave the same way.

The target and user info are now retained, and they are released when the timer is invalidated rather than deallocated. Deallocation automatically causes
invalidation of the timer.




reply via email to

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