Skip to content

Commit

Permalink
Fixing a memory leak + shutting up warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
searchivairus committed Jul 20, 2017
1 parent 4d9d86d commit 090e6f7
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 894 deletions.
4 changes: 0 additions & 4 deletions similarity_search/include/factory/init_methods.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ inline void initMethods() {
REGISTER_METHOD_CREATOR(double, METH_HNSW, CreateHnsw)
REGISTER_METHOD_CREATOR(int, METH_HNSW, CreateHnsw)

REGISTER_METHOD_CREATOR(float, METH_SMALL_WORLD_RAND_SPLIT, CreateSmallWorldRandSplit)
REGISTER_METHOD_CREATOR(double, METH_SMALL_WORLD_RAND_SPLIT, CreateSmallWorldRandSplit)
REGISTER_METHOD_CREATOR(int, METH_SMALL_WORLD_RAND_SPLIT, CreateSmallWorldRandSplit)

// SA-tree
REGISTER_METHOD_CREATOR(float, METH_SATREE, CreateSATree)
REGISTER_METHOD_CREATOR(double, METH_SATREE, CreateSATree)
Expand Down
9 changes: 0 additions & 9 deletions similarity_search/include/factory/method/small_world_rand.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#define _FACTORY_SMALL_WORLD_RAND_H_

#include <method/small_world_rand.h>
#include <method/small_world_rand_split.h>

namespace similarity {

Expand All @@ -34,14 +33,6 @@ Index<dist_t>* CreateSmallWorldRand(bool PrintProgress,
return new SmallWorldRand<dist_t>(PrintProgress, space, DataObjects);
}

template <typename dist_t>
Index<dist_t>* CreateSmallWorldRandSplit(bool PrintProgress,
const string& SpaceType,
Space<dist_t>& space,
const ObjectVector& DataObjects) {
return new SmallWorldRandSplit<dist_t>(PrintProgress, space, DataObjects);
}

/*
* End of creating functions.
*/
Expand Down
2 changes: 1 addition & 1 deletion similarity_search/include/method/small_world_rand.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class SmallWorldRand : public Index<dist_t> {

mutable mutex ElListGuard_;
ElementMap ElList_;
size_t NextNodeId_ = 0; // This is internal node id
IdType NextNodeId_ = 0; // This is internal node id
bool changedAfterCreateIndex_ = false;
MSWNode* pEntryPoint_ = nullptr;

Expand Down
225 changes: 0 additions & 225 deletions similarity_search/include/method/small_world_rand_split.h

This file was deleted.

Loading

0 comments on commit 090e6f7

Please sign in to comment.