From 605fa140cc34caa6cc1a9c00c6b40b9a89fc2929 Mon Sep 17 00:00:00 2001 From: Krishna Vedala Date: Thu, 28 May 2020 19:54:24 -0400 Subject: [PATCH] free dynamically allocated memory --- search/exponential_search.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/search/exponential_search.cpp b/search/exponential_search.cpp index 5f9e64217..79f09e38b 100644 --- a/search/exponential_search.cpp +++ b/search/exponential_search.cpp @@ -59,5 +59,6 @@ int main() { assert(struzik_search(sorted_array, 7, 50) == nullptr); assert(struzik_search(sorted_array, 7, 7) == sorted_array); // TEST CASES + delete[] sorted_array; return 0; }