From 24fe5cb6a0a52d9d0153a1b9ddf77b12c7a85df2 Mon Sep 17 00:00:00 2001 From: giorgiomarcias Date: Wed, 23 Mar 2016 13:02:35 +0000 Subject: [PATCH] Deallocating a dynamically allocated array of data must be done with delete[] instead of delete --- vcg/container/simple_temporary_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcg/container/simple_temporary_data.h b/vcg/container/simple_temporary_data.h index 8f384777..d7ea0cf7 100644 --- a/vcg/container/simple_temporary_data.h +++ b/vcg/container/simple_temporary_data.h @@ -53,7 +53,7 @@ public: bool * newdataLoc = new bool[ sz ]; if(datasize!=0) memcpy(newdataLoc,data,sizeof(datasize)); std::swap(data,newdataLoc); - if(newdataLoc != 0) delete newdataLoc; + if(newdataLoc != 0) delete[] newdataLoc; datareserve = sz; }