From 6859c8b20031179b536b6b88c1650d17944c26da Mon Sep 17 00:00:00 2001 From: karl Date: Mon, 18 Jan 2021 18:59:13 +0100 Subject: [PATCH] Hotfix for memory leak The Vector class is still leaky, but it's not a noticeable problem with this fix. Proper fixing requries more debugging --- Util/kdtree.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Util/kdtree.h b/Util/kdtree.h index fb9f140..a28bfe3 100644 --- a/Util/kdtree.h +++ b/Util/kdtree.h @@ -129,6 +129,8 @@ class KDTree { result = current_result; } } + + delete[] current_result.c; } // Is the ray origin within the left or right child node bounding box?