Use delete[] instead of delete for array types.
For more information, see issue 14:
https://code.google.com/p/cld2/issues/detail?id=14



git-svn-id: https://cld2.googlecode.com/svn/trunk@161 b252ecd4-b096-bf77-eb8e-91563289f87e
diff --git a/internal/cld2_dynamic_data_loader.cc b/internal/cld2_dynamic_data_loader.cc
index 4b4afb9..33b7ffb 100644
--- a/internal/cld2_dynamic_data_loader.cc
+++ b/internal/cld2_dynamic_data_loader.cc
@@ -1,4 +1,3 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -117,7 +116,7 @@
   if (expectedHeaderSize != bytesRead) {
     std::cerr << "Header size mismatch! Expected " << expectedHeaderSize << ", but read " << bytesRead << std::endl;
     delete header;
-    delete tableHeaders;
+    delete[] tableHeaders;
     return NULL;
   }
 
@@ -134,7 +133,7 @@
   if (actualSize != header->totalFileSizeBytes) {
     std::cerr << "File size mismatch! Expected " << header->totalFileSizeBytes << ", but found " << actualSize << std::endl;
     delete header;
-    delete tableHeaders;
+    delete[] tableHeaders;
     return NULL;
   }
   return header;
@@ -253,7 +252,7 @@
   result->deltaocta_obj = &tableSummaries[5];
   result->distinctocta_obj = &tableSummaries[6];
   result->kExpectedScore = read_kAvgDeltaOctaScore;
-  delete header->tableHeaders;
+  delete[] header->tableHeaders;
   delete header;
   return result;
 }
diff --git a/internal/cld2_dynamic_data_tool.cc b/internal/cld2_dynamic_data_tool.cc
index 5adaf0d..10fde38 100644
--- a/internal/cld2_dynamic_data_tool.cc
+++ b/internal/cld2_dynamic_data_tool.cc
@@ -156,7 +156,7 @@
       return -1;
     }
     CLD2DynamicData::dumpHeader(header);
-    delete header->tableHeaders;
+    delete[] header->tableHeaders;
     delete header;
   }