1

如果有人使用 TNTNET WEB 服务器使用 C++ 开发 Web 应用程序,您能否分享如何处理内存管理?我对此很天真,只是开始探索它。提前致谢。

4

1 回答 1

1

Normally, you would just add objects (no pointers) to the <%session> tag in your component, like in the examples of the ecpp manpage.

If you need to be able to replace these objects throughout one session, you can use std::unique_ptr<class> or std::shared_ptr<class> instead, but those are only available if your compiler supports C++11.

于 2014-10-29T17:02:31.057 回答