mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-06 22:39:55 +08:00
fix a memory leak with operator= for ExplicitBitVect
thanks to Alex S for pointing it out
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user