mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
-Changed Godot exit to be clean.
-Added more debug information on memory cleanliness on exit (if run with -v) -Fixed several memory leaks, fixes #1731, fixes #755
This commit is contained in:
parent
28c4afeb57
commit
59154cccf9
37 changed files with 263 additions and 68 deletions
|
|
@ -87,6 +87,9 @@ static MessageQueue *message_queue=NULL;
|
|||
static Performance *performance = NULL;
|
||||
static PathRemap *path_remap;
|
||||
static PackedData *packed_data=NULL;
|
||||
#ifdef MINIZIP_ENABLED
|
||||
static ZipArchive *zip_packed_data=NULL;
|
||||
#endif
|
||||
static FileAccessNetworkClient *file_access_network_client=NULL;
|
||||
static TranslationServer *translation_server = NULL;
|
||||
|
||||
|
|
@ -248,7 +251,8 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
|
|||
packed_data = memnew(PackedData);
|
||||
|
||||
#ifdef MINIZIP_ENABLED
|
||||
packed_data->add_pack_source(ZipArchive::get_singleton());
|
||||
zip_packed_data = ZipArchive::get_singleton();
|
||||
packed_data->add_pack_source(zip_packed_data);
|
||||
#endif
|
||||
|
||||
bool editor=false;
|
||||
|
|
@ -740,6 +744,15 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
|
|||
memdelete(packed_data);
|
||||
if (file_access_network_client)
|
||||
memdelete(file_access_network_client);
|
||||
|
||||
if (packed_data)
|
||||
memdelete( packed_data );
|
||||
#ifdef MINIZIP_ENABLED
|
||||
if (zip_packed_data)
|
||||
memdelete( zip_packed_data );
|
||||
#endif
|
||||
|
||||
|
||||
unregister_core_types();
|
||||
|
||||
OS::get_singleton()->_cmdline.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue