C++ class 只允许堆创建/只允许栈创建

如何让一个class只允许堆中创建

析构函数 private

只允许栈创建

new和delete 重载 private

posted @ 2020-02-22 16:33  stdpain  阅读(156)  评论(0编辑  收藏  举报