move the code freeing temporary argv array to wxEntry(HINSTANCE) overload to avoid doing it twice in some cases
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -503,17 +503,6 @@ wxApp::wxApp()
|
||||
|
||||
wxApp::~wxApp()
|
||||
{
|
||||
// our cmd line arguments are allocated inside wxEntry(HINSTANCE), they
|
||||
// don't come from main(), so we have to free them
|
||||
|
||||
while ( argc )
|
||||
{
|
||||
// m_argv elements were allocated by wxStrdup()
|
||||
free(argv[--argc]);
|
||||
}
|
||||
|
||||
// but m_argv itself -- using new[]
|
||||
delete [] argv;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user