Commit abfcf8a2 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

renamed PooledAllocator::malloc to PooledAllocator::allocateBytes, Matrix::free…

renamed PooledAllocator::malloc to PooledAllocator::allocateBytes, Matrix::free to Matrix::release to avoid conflicts with VisualStudio
parent 36ebf4ef
...@@ -119,7 +119,7 @@ public: ...@@ -119,7 +119,7 @@ public:
* Returns a pointer to a piece of new memory of the given size in bytes * Returns a pointer to a piece of new memory of the given size in bytes
* allocated from the pool. * allocated from the pool.
*/ */
void* malloc(int size) void* allocateBytes(int size)
{ {
int blocksize; int blocksize;
...@@ -176,7 +176,7 @@ public: ...@@ -176,7 +176,7 @@ public:
template <typename T> template <typename T>
T* allocate(size_t count = 1) T* allocate(size_t count = 1)
{ {
T* mem = (T*) this->malloc(sizeof(T)*count); T* mem = (T*) this->allocateBytes(sizeof(T)*count);
return mem; return mem;
} }
......
...@@ -527,9 +527,9 @@ private: ...@@ -527,9 +527,9 @@ private:
bestCost = kdtreeCost.first.totalCost; bestCost = kdtreeCost.first.totalCost;
} }
gt_matches.free(); gt_matches.release();
sampledDataset.free(); sampledDataset.release();
testDataset.free(); testDataset.release();
return bestParams; return bestParams;
} }
...@@ -601,7 +601,7 @@ private: ...@@ -601,7 +601,7 @@ private:
speedup = linear/searchTime; speedup = linear/searchTime;
gt_matches.free(); gt_matches.release();
} }
return speedup; return speedup;
......
...@@ -62,7 +62,7 @@ public: ...@@ -62,7 +62,7 @@ public:
/** /**
* Convenience function for deallocating the storage data. * Convenience function for deallocating the storage data.
*/ */
void free() void release()
{ {
if (data!=NULL) delete[] data; if (data!=NULL) delete[] data;
} }
......
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