From fdaa2920eb21fff3320a17e9239e04dfadecdb00 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 18 Apr 2015 14:38:54 -0300 Subject: Updated copyright year in all headers --- core/io/file_access_pack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/io/file_access_pack.cpp') diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index afbd7e3d46..15435a8b61 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ -- cgit v1.2.3 From 59154cccf9fcf814a21a2596993fb1b6777d3bb7 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 20 Apr 2015 19:38:02 -0300 Subject: -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 --- core/io/file_access_pack.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'core/io/file_access_pack.cpp') diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index 15435a8b61..bf1211f2b3 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -107,6 +107,21 @@ PackedData::PackedData() { add_pack_source(memnew(PackedSourcePCK)); } +void PackedData::_free_packed_dirs(PackedDir *p_dir) { + + for (Map::Element *E=p_dir->subdirs.front();E;E=E->next()) + _free_packed_dirs(E->get()); + memdelete(p_dir); +} + +PackedData::~PackedData() { + + for(int i=0;i Date: Wed, 6 May 2015 20:37:25 -0300 Subject: Fix segment violation MINIZIP_ENABLED --- core/io/file_access_pack.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/io/file_access_pack.cpp') diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index bf1211f2b3..339a6d0528 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -92,7 +92,9 @@ void PackedData::add_path(const String& pkg_path, const String& path, uint64_t o void PackedData::add_pack_source(PackSource *p_source) { - sources.push_back(p_source); + if (p_source != NULL) { + sources.push_back(p_source); + } }; PackedData *PackedData::singleton=NULL; -- cgit v1.2.3