Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
delete v_array's begin on exit
This hopefully fixes the memory leak observed in
#401
  • Loading branch information
Soeren Sonnenburg committed Apr 23, 2012
1 parent 3007eb5 commit 098c0cc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/shogun/lib/v_array.h
Expand Up @@ -51,6 +51,15 @@ template<class T> class v_array
end_array = NULL;
}

/** Destructor
*
* will only free the array not the ptrs it contains
*/
~v_array()
{
SG_FREE(begin);
}

/**
* Operator [] overloaded to return the
* i-th element of the stored array.
Expand Down

0 comments on commit 098c0cc

Please sign in to comment.