From a53e3f0f5d1a4a96479544b5c48a2eb1dcdb4064 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Sat, 30 Apr 2011 23:02:45 -0400 Subject: fix memory leak! --- utils/fast_sparse_vector.h | 1 + 1 file changed, 1 insertion(+) (limited to 'utils') diff --git a/utils/fast_sparse_vector.h b/utils/fast_sparse_vector.h index b9315235..8d381b60 100644 --- a/utils/fast_sparse_vector.h +++ b/utils/fast_sparse_vector.h @@ -127,6 +127,7 @@ class FastSparseVector { } const FastSparseVector& operator=(const FastSparseVector& other) { if (&other == this) return *this; + clear(); std::memcpy(this, &other, sizeof(FastSparseVector)); if (is_remote_) data_.rbmap = new std::map(*data_.rbmap); -- cgit v1.2.3