summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2016-05-04 11:46:28 -0300
committerGeorge Marques <george@gmarqu.es>2016-05-04 11:46:28 -0300
commit5930408746fab692aaf277ec7b6482e7055f3344 (patch)
treeb3042f5eac65b2d2b1299645f00cef627b40923e
parent9424c6c58f0b33f06807936958978e907574a845 (diff)
Fix memory leak
As pointed out by @sanikoyes in #4541.
-rw-r--r--tools/doc/doc_data.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp
index dc2150e6cc..cb64e55372 100644
--- a/tools/doc/doc_data.cpp
+++ b/tools/doc/doc_data.cpp
@@ -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