Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Another way to avoid memleak with dense features serialization
  • Loading branch information
lisitsyn committed Aug 30, 2012
1 parent 4520986 commit 25ba47c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/shogun/features/DenseFeatures.cpp
Expand Up @@ -579,7 +579,7 @@ template<class ST> void CDenseFeatures<ST>::init()
num_vectors = 0;
num_features = 0;

feature_matrix = SGMatrix<ST>();
feature_matrix = SGMatrix<ST>(1,1);

This comment has been minimized.

Copy link
@sonney2k

sonney2k Aug 31, 2012

Member

that is as bad... - lets talk on IRC

feature_cache = NULL;

set_generic<ST>();
Expand Down
2 changes: 1 addition & 1 deletion src/shogun/lib/SGMatrix.h
Expand Up @@ -25,7 +25,7 @@ template<class T> class SGMatrix : public SGReferencedData
{
public:
/** default constructor */
SGMatrix() : SGReferencedData(true)
SGMatrix() : SGReferencedData(false)
{
init_data();
}
Expand Down

0 comments on commit 25ba47c

Please sign in to comment.