Fixing memleaks in main/main.cpp
This commit is contained in:
parent
4baf65dab7
commit
8c0c279280
1 changed files with 3 additions and 2 deletions
|
@ -796,7 +796,6 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
|
||||||
main_args.clear();
|
main_args.clear();
|
||||||
|
|
||||||
print_help(execpath);
|
print_help(execpath);
|
||||||
|
|
||||||
|
|
||||||
if (performance)
|
if (performance)
|
||||||
memdelete(performance);
|
memdelete(performance);
|
||||||
|
@ -812,6 +811,8 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
|
||||||
memdelete(packed_data);
|
memdelete(packed_data);
|
||||||
if (file_access_network_client)
|
if (file_access_network_client)
|
||||||
memdelete(file_access_network_client);
|
memdelete(file_access_network_client);
|
||||||
|
if(path_remap)
|
||||||
|
memdelete(path_remap);
|
||||||
|
|
||||||
// Note 1: *zip_packed_data live into *packed_data
|
// Note 1: *zip_packed_data live into *packed_data
|
||||||
// Note 2: PackedData::~PackedData destroy this.
|
// Note 2: PackedData::~PackedData destroy this.
|
||||||
|
@ -820,7 +821,7 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
|
||||||
// memdelete( zip_packed_data );
|
// memdelete( zip_packed_data );
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
unregister_core_driver_types();
|
||||||
unregister_core_types();
|
unregister_core_types();
|
||||||
|
|
||||||
OS::get_singleton()->_cmdline.clear();
|
OS::get_singleton()->_cmdline.clear();
|
||||||
|
|
Loading…
Add table
Reference in a new issue