fix a memory leak with operator= for ExplicitBitVect

thanks to Alex S for pointing it out
This commit is contained in:
Greg Landrum
2014-07-01 06:38:57 +02:00
parent 6e27eb3f1f
commit b9e129dd2f

View File

@@ -48,6 +48,7 @@ ExplicitBitVect::ExplicitBitVect(const char *data,const unsigned int dataLen)
ExplicitBitVect& ExplicitBitVect::operator=(const ExplicitBitVect& other){
d_size = other.d_size;
delete dp_bits;
dp_bits = new boost::dynamic_bitset<>(*(other.dp_bits));
d_numOnBits=other.d_numOnBits;
return *this;