From e8f96f58aa6b64726f62f7304964d1c0a82b5c38 Mon Sep 17 00:00:00 2001 From: Darren Garvey Date: Mon, 10 Aug 2015 02:16:20 +0100 Subject: [PATCH] Fix memory leak in convert_mnist_siamese_data. This fixes a memory leak by using delete[] rather than plain delete. --- examples/siamese/convert_mnist_siamese_data.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/siamese/convert_mnist_siamese_data.cpp b/examples/siamese/convert_mnist_siamese_data.cpp index 71c56a0..8008b44 100644 --- a/examples/siamese/convert_mnist_siamese_data.cpp +++ b/examples/siamese/convert_mnist_siamese_data.cpp @@ -102,7 +102,7 @@ void convert_dataset(const char* image_filename, const char* label_filename, } delete db; - delete pixels; + delete [] pixels; } int main(int argc, char** argv) { -- 2.7.4