Fixed a memory leak of widgets triggered when the close box for a window is hit

git-svn-id: svn://10.0.0.236/trunk@49903 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com
1999-10-05 23:57:57 +00:00
parent 934632fc76
commit 3a3369076f

View File

@@ -136,8 +136,9 @@ NS_IMETHODIMP nsWindow::Destroy()
if (mIsDestroyingWindow == PR_TRUE) {
nsBaseWidget::Destroy();
if (PR_FALSE == mOnDestroyCalled)
if (PR_FALSE == mOnDestroyCalled) {
nsWidget::OnDestroy();
}
if (mShell) {
if (GTK_IS_WIDGET(mShell))
@@ -160,8 +161,10 @@ nsWindow::OnDestroySignal(GtkWidget* aGtkWidget)
gint handle_delete_event(GtkWidget *w, GdkEventAny *e, nsWindow *win)
{
NS_ADDREF(win);
win->SetIsDestroying( PR_TRUE );
win->Destroy();
NS_RELEASE(win);
return TRUE;
}