Reference Counting in C++
问题 I'm implementing a math library in C++. The library will be compiled to a DLL so those who use it will only need the header files the classes' definitions. The users of my classes will be people who are new to the language. However, there are some objects that might be referenced in several parts of their programs. Since I don't expect them to do the memory management, I'd like to do it myself. Therefore, I have to implement reference counting (garbage collection is not a possibility). I want