[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-gtk
Subject:    Re: Is this extra addref a bug?
From:       Stuart Parmenter <pavlov () netscape ! com>
Date:       2000-01-25 8:40:49
[Download RAW message or body]

wow, I'm not sure how we missed that.  Thanks Jerry!

Chris Blizzard wrote:
> 
> Chris Blizzard wrote:
> >
> > "Jerry L. Kirk" wrote:
> > >
> > > void nsWidget::OnDestroy()
> > > {
> > >   mOnDestroyCalled = PR_TRUE;
> > >   // release references to children, device context, toolkit + app shell
> > >   nsBaseWidget::OnDestroy();
> > >
> > >   NS_ADDREF_THIS();
> > >   DispatchStandardEvent(NS_DESTROY);
> > >   NS_ADDREF_THIS();
> > > }
> > >
> > > This looks very fishy to me?... anyone know why its here?
> >
> > Uhh...that's a bug.  Wow.  I'll fix that in a moment.
> >
> 
> Index: nsWidget.cpp
> ===================================================================
> RCS file: /cvsroot/mozilla/widget/src/gtk/nsWidget.cpp,v
> retrieving revision 1.193
> diff -u -r1.193 nsWidget.cpp
> --- nsWidget.cpp        2000/01/10 22:12:47     1.193
> +++ nsWidget.cpp        2000/01/24 16:45:04
> @@ -399,7 +399,7 @@
> 
>    NS_ADDREF_THIS();
>    DispatchStandardEvent(NS_DESTROY);
> -  NS_ADDREF_THIS();
> +  NS_RELEASE_THIS();
>  }
> 
>  gint
> 
> On a shutdown where I would normally see about 300 leaking widgets it only
> leaks about 30 now.  Hot damn, I'm checking this in when the tree opens.
> Thanks, Jerry!
> 
> --Chris
> 
> --
> ------------
> Christopher Blizzard
> http://people.redhat.com/blizzard/
> Eagles may soar, but weasels don't get sucked into jet engines.
> ------------

-- 
pavlov@pavlov.net
http://www.pavlov.net/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic