diff options
| author | Juan Linietsky | 2015-04-20 19:38:02 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-04-20 19:38:02 -0300 |
| commit | 59154cccf9fcf814a21a2596993fb1b6777d3bb7 (patch) | |
| tree | 4132620a9d924463dae4b64fea2dde68a14023e7 /core/io/file_access_pack.cpp | |
| parent | 28c4afeb5733f9ca9725ab2a5f4066af8e02b2a6 (diff) | |
| download | godot-59154cccf9fcf814a21a2596993fb1b6777d3bb7.tar.gz godot-59154cccf9fcf814a21a2596993fb1b6777d3bb7.tar.zst godot-59154cccf9fcf814a21a2596993fb1b6777d3bb7.zip | |
Diffstat (limited to 'core/io/file_access_pack.cpp')
| -rw-r--r-- | core/io/file_access_pack.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index 15435a8b6..bf1211f2b 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<String,PackedDir*>::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<sources.size();i++) { + memdelete(sources[i]); + } + _free_packed_dirs(root); +} + ////////////////////////////////////////////////////////////////// |
