diff options
author | Juan Linietsky <red@kyoko> | 2015-05-01 23:20:41 -0300 |
---|---|---|
committer | Juan Linietsky <red@kyoko> | 2015-05-01 23:20:41 -0300 |
commit | dda60296d81edaabfdb56f47a2c949b5dad283fb (patch) | |
tree | b41e31cc4620689a1e91adf852d0926fc600607a /core/io/file_access_pack.cpp | |
parent | fb8b740fcb50dc38526b458af096b72d1303d3e5 (diff) | |
parent | 61e90385f6cbeebb8d3d03c33078802c2fa11eda (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'core/io/file_access_pack.cpp')
-rw-r--r-- | core/io/file_access_pack.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index afbd7e3d46..bf1211f2b3 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 */ @@ -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); +} + ////////////////////////////////////////////////////////////////// |