From 92fc763925b0941092dc6287e08f9fd774e585ca Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Viel Date: Wed, 18 Dec 2013 15:01:47 +0100 Subject: [PATCH] Fix some memory leaks in HierarchicalClusteringIndex --- .../flann/hierarchical_clustering_index.h | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h b/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h index ce2d62245..c27b64834 100644 --- a/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h +++ b/modules/flann/include/opencv2/flann/hierarchical_clustering_index.h @@ -298,6 +298,11 @@ public: trees_ = get_param(params,"trees",4); root = new NodePtr[trees_]; indices = new int*[trees_]; + + for (int i=0; i