Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Removed methods in Allocator related to new assignment operator
  • Loading branch information
sofian committed Apr 11, 2014
1 parent 1c6cfb9 commit 3ee589d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/qualia/core/Allocator.cpp
Expand Up @@ -70,3 +70,7 @@ void Alloc::free(void* ptr) {
void Alloc::init(Allocator* alloc) {
inst = alloc;
}

//void * operator new(size_t size, Allocator* alloc) {
// return Alloc::malloc(size);
//}
7 changes: 7 additions & 0 deletions src/qualia/core/Allocator.h
Expand Up @@ -87,6 +87,13 @@ class Alloc {
/// Macro equivalent of *new* operator: allocates memory using Alloc::malloc().
#define Q_NEW(T) new( Alloc::malloc(sizeof(T)) ) T

//void * operator new(size_t size, Allocator* alloc);
//#define Q_NEW(T) new( Alloc::instance() ) T
//#define _NEW new( Alloc::instance() )

//template<class T> T* _Q_ALLOC() { return Alloc::malloc(sizeof(T)); }


/// Template equivalent of *delete* operator: explicitely calls destuctor and releases memory using Alloc::free().
template<class T>
void Q_DELETE(T* obj) {
Expand Down

0 comments on commit 3ee589d

Please sign in to comment.