Skip to content

Commit

Permalink
free old ref before copying
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed May 5, 2012
1 parent bed68da commit 9fb6130
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/shogun/lib/SGVector.h
Expand Up @@ -55,6 +55,7 @@ template<class T> class SGVector
/** override assignment operator to increase refcount on assignments */
SGVector& operator= (const SGVector &orig)
{
unref();
vector=orig.vector;
vlen=orig.vlen;
m_refcount=orig.m_refcount;
Expand Down

0 comments on commit 9fb6130

Please sign in to comment.