Original Post
Hey, I''m trying to create a small memory manager because I''m allocating / deallocating classes a great deal, and it''s killing my windows resouces. Anyway, I overloaded new to take from a predefined memory pool, and I overloaded delete to free memory from a predefined memory pool.
Here''s the problem. I''m creating all of these as global overloads of new and delete. This causes stuff to use my overloaded delete that I don''t want use my overloaded delete (including things like the IO stream classes). My new works fine, cause it''s an overload of placement new:
void *new(size_t size, const char *file, int line);
I have a delete the same way:
void delete(void *ptr, const char *file, int line);
However, the MSVC++ compiler is telling me any time I use the overloaded placement delete (e.g. delete(__FILE__, __LINE__) ptr
that I can''t delete something that isn''t a pointer. What''s going on and how do I fix it? Is thi a problem in microsoft''s compiler or am I missing something?