Created
May 3, 2016 21:14
-
-
Save mpenick/9de7888f2fc6c62b1808ed6813591b71 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace cass { | |
| struct Memory { | |
| static void* operator new(std::size_t size) { | |
| printf("in-class new\n"); | |
| return malloc(size); | |
| } | |
| static void* operator new[](std::size_t size) { | |
| printf("in-class new[]\n"); | |
| return malloc(size); | |
| } | |
| static void operator delete(void* ptr) { | |
| printf("in-class delete\n"); | |
| return free(ptr); | |
| } | |
| static void operator delete[](void* ptr) { | |
| printf("in-class delete[]\n"); | |
| return free(ptr); | |
| } | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment