From 1cf69babe2220b2f3d745b3f17455090df00bdc6 Mon Sep 17 00:00:00 2001 From: Joshua Moerman Date: Wed, 4 Aug 2010 21:53:21 +0200 Subject: [PATCH] used delete[] instead of delete, so better it is --- Canvas.cpp | 4 ++-- kernels/KernelBasicParameter.cpp | 2 +- kernels/KernelBasicVector.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Canvas.cpp b/Canvas.cpp index 7852747..7eb04ba 100644 --- a/Canvas.cpp +++ b/Canvas.cpp @@ -180,8 +180,8 @@ void Canvas::output_file(const char * filename){ } - delete max_int; - delete power; + delete[] max_int; + delete[] power; std::cout << "ready for writing file i suppose: " << filename << std::endl; diff --git a/kernels/KernelBasicParameter.cpp b/kernels/KernelBasicParameter.cpp index 59e8276..cce6c6f 100644 --- a/kernels/KernelBasicParameter.cpp +++ b/kernels/KernelBasicParameter.cpp @@ -38,7 +38,7 @@ void KernelBasicParameter::init(){ } void KernelBasicParameter::dealloc(){ - delete parameters; + delete[] parameters; } diff --git a/kernels/KernelBasicVector.cpp b/kernels/KernelBasicVector.cpp index 4bdf8f9..b8398ec 100644 --- a/kernels/KernelBasicVector.cpp +++ b/kernels/KernelBasicVector.cpp @@ -33,8 +33,8 @@ void KernelBasicVector::init(){ } void KernelBasicVector::dealloc(){ - delete vectorOld; - delete vectorNew; + delete[] vectorOld; + delete[] vectorNew; }