1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00

Fix memory leak

As pointed out by @sanikoyes in #4541.
This commit is contained in:
George Marques
2016-05-04 11:46:28 -03:00
parent 9424c6c58f
commit 5930408746

View File

@@ -64,7 +64,8 @@ void DocData::merge_from(const DocData& p_data) {
// since polymorphic functions are allowed we need to check the type of
// the arguments so we make sure they are different.
int arg_count = cf.methods[j].arguments.size();
bool* arg_used = new bool[arg_count];
Vector<bool> arg_used;
arg_used.resize(arg_count);
for (int l = 0; l < arg_count; ++l) arg_used[l] = false;
// also there is no guarantee that argument ordering will match, so we
// have to check one by one so we make sure we have an exact match