Record every new and delete actions in C++ user function call for memory leak detective in a dynamic way