From f4cf6c562beae8e000def09a6872df59cfa58d38 Mon Sep 17 00:00:00 2001 From: "ramiro%netscape.com" Date: Mon, 15 Mar 1999 21:23:49 +0000 Subject: [PATCH] Fix bugs 3653, 3652 and 3566. Leaking timers. Thanks to Tomi Leppikangas for providing the fix and Bruce Mitchener for purifying it. git-svn-id: svn://10.0.0.236/trunk@24178 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/base/src/gtk/nsTimer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mozilla/base/src/gtk/nsTimer.cpp b/mozilla/base/src/gtk/nsTimer.cpp index 4ecc383a782..d82fac70590 100644 --- a/mozilla/base/src/gtk/nsTimer.cpp +++ b/mozilla/base/src/gtk/nsTimer.cpp @@ -131,6 +131,7 @@ TimerImpl::Init(nsITimerCallback *aCallback, { //printf("TimerImpl::Init called with callback only for %p\n", this); mCallback = aCallback; + NS_ADDREF(mCallback); // mRepeat = aRepeat; if ((aDelay > 10000) || (aDelay < 0)) { printf("Timer::Init() called with bogus value \"%d\"! Not enabling timer.\n", @@ -149,7 +150,7 @@ TimerImpl::Init(PRUint32 aDelay) //printf("TimerImpl::Init called with delay %d only for %p\n", aDelay, this); mDelay = aDelay; - NS_ADDREF(this); + // NS_ADDREF(this); return NS_OK; }