Commit 072882e0 by maarten

fixed memory leak

git-svn-id: svn+ssh://gitlab/srv/svn-repos/pdb-redo/trunk@491 a1961a4f-ab94-4bcc-80e8-33b5a54de466
parent 3ab625cb
...@@ -178,7 +178,7 @@ struct AtomImpl ...@@ -178,7 +178,7 @@ struct AtomImpl
AtomImpl(const AtomImpl& impl, const Point& d, const clipper::RTop_orth& rt) AtomImpl(const AtomImpl& impl, const Point& d, const clipper::RTop_orth& rt)
: mFile(impl.mFile), mId(impl.mId), mType(impl.mType), mAtomID(impl.mAtomID) : mFile(impl.mFile), mId(impl.mId), mType(impl.mType), mAtomID(impl.mAtomID)
, mCompID(impl.mCompID), mAsymID(impl.mAsymID), mSeqID(impl.mSeqID) , mCompID(impl.mCompID), mAsymID(impl.mAsymID), mSeqID(impl.mSeqID)
, mAltID(impl.mAltID), mLocation(impl.mLocation), mRefcount(impl.mRefcount) , mAltID(impl.mAltID), mLocation(impl.mLocation), mRefcount(1)
, mRow(impl.mRow), mCompound(impl.mCompound), mRadius(impl.mRadius) , mRow(impl.mRow), mCompound(impl.mCompound), mRadius(impl.mRadius)
, mCachedProperties(impl.mCachedProperties) , mCachedProperties(impl.mCachedProperties)
, mSymmetryCopy(true), mRTop(rt), mD(d) , mSymmetryCopy(true), mRTop(rt), mD(d)
...@@ -262,7 +262,7 @@ struct AtomImpl ...@@ -262,7 +262,7 @@ struct AtomImpl
void release() void release()
{ {
if (--mRefcount < 0) if (--mRefcount <= 0)
delete this; delete this;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment