зеркало из https://github.com/mozilla/pjs.git
Use nsCRT::free() instead of delete[] for char* data.
This commit is contained in:
Родитель
7fd0cabe7f
Коммит
53bfc36a73
|
@ -237,7 +237,7 @@ NS_METHOD nsContextMenu::AddMenu(nsIMenu * aMenu)
|
|||
NS_RELEASE(pnsMenuItem);
|
||||
}
|
||||
|
||||
delete[] labelStr;
|
||||
nsCRT::free(labelStr);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ NS_METHOD nsContextMenu::RemoveItem(const PRUint32 aCount)
|
|||
/*
|
||||
gtk_menu_shell_remove (GTK_MENU_SHELL (mMenu), item);
|
||||
|
||||
delete[] labelStr;
|
||||
nsCRT::free(labelStr);
|
||||
|
||||
voidData = NULL;
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ nsFileWidget::~nsFileWidget()
|
|||
gchar *data = (gchar*)gtk_object_get_data(GTK_OBJECT(menu_item), "filters");
|
||||
|
||||
if (data)
|
||||
delete[] data;
|
||||
nsCRT::free(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ NS_IMETHODIMP nsFileWidget::SetFilterList(PRUint32 aNumberOfFilters,
|
|||
gtk_menu_append(GTK_MENU(mFilterMenu), menu_item);
|
||||
gtk_widget_show(menu_item);
|
||||
|
||||
delete[] foo;
|
||||
nsCRT::free(foo);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -181,7 +181,7 @@ NS_METHOD nsMenu::GetAccessKey(nsString &aText)
|
|||
g_print("GetAccessKey returns \"%s\"\n", foo);
|
||||
#endif
|
||||
|
||||
delete [] foo;
|
||||
nsCRT::free(foo);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ NS_METHOD nsMenu::SetAccessKey(const nsString &aText)
|
|||
g_print("SetAccessKey setting to \"%s\"\n", foo);
|
||||
#endif
|
||||
|
||||
delete [] foo;
|
||||
nsCRT::free(foo);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -383,7 +383,7 @@ NS_METHOD nsMenu::RemoveItem(const PRUint32 aPos)
|
|||
/*
|
||||
gtk_menu_shell_remove (GTK_MENU_SHELL (mMenu), item);
|
||||
|
||||
delete[] labelStr;
|
||||
nsCRT::free(labelStr);
|
||||
|
||||
voidData = NULL;
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ NS_METHOD nsMenuBar::AddMenu(nsIMenu * aMenu)
|
|||
|
||||
char *foo = Label.ToNewCString();
|
||||
g_print("%s\n", foo);
|
||||
delete [] foo;
|
||||
nsCRT::free(foo);
|
||||
|
||||
widget = nsMenuItem::CreateLocalized(Label);
|
||||
gtk_widget_show(widget);
|
||||
|
|
Загрузка…
Ссылка в новой задаче