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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user