diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2011-11-11 14:11:10 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2011-11-11 15:02:26 +0400 |
commit | 087756b8c329149751af3483223f52f13fa6d7a5 (patch) | |
tree | abf65b85b395b3de4a03348bca98ce42f6b9b023 /mert/FeatureStats.cpp | |
parent | c5c128f26372ee7383cb6a30a60b3d9e21bd1e6e (diff) |
Fix memory leaks in extractor.
Diffstat (limited to 'mert/FeatureStats.cpp')
-rw-r--r-- | mert/FeatureStats.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mert/FeatureStats.cpp b/mert/FeatureStats.cpp index 3d2b1d1d0..21d97f61d 100644 --- a/mert/FeatureStats.cpp +++ b/mert/FeatureStats.cpp @@ -90,7 +90,7 @@ FeatureStats::FeatureStats() FeatureStats::~FeatureStats() { - delete[] array_; + delete [] array_; }; FeatureStats::FeatureStats(const FeatureStats &stats) @@ -121,7 +121,7 @@ void FeatureStats::expand() available_*=2; featstats_t t_ = new FeatureStatsType[available_]; memcpy(t_,array_,featbytes_); - delete array_; + delete [] array_; array_=t_; } @@ -201,7 +201,7 @@ void FeatureStats::savebin(std::ofstream& outFile) FeatureStats& FeatureStats::operator=(const FeatureStats &stats) { - delete array_; + delete [] array_; available_ = stats.available(); entries_ = stats.size(); array_ = new FeatureStatsType[available_]; |