0

我在哪里可以找到Boost Singleton Poolpurge_memory和in之间的区别?release_memory这里它说:

Singleton Usage是每个Pool是一个具有静态持续时间的对象的方法;也就是说,直到程序退出它才会被销毁。可以共享具有 Singleton Usage 的池对象;因此,单例用法也意味着线程安全。由具有 Singleton Usage 的 Pool 对象分配的系统内存可以通过release_memory或释放purge_memory

4

1 回答 1

0

单击页面上的几个链接会导致该页面

在那里您可以阅读以下内容:

t.release_memory()  bool    t must be ordered. Frees every memory block that doesn't have any
                allocated chunks. Returns true if at least one memory block was freed.

t.purge_memory()    bool    Frees every memory block. This function invalidates any pointers
                previously returned by allocation functions of t. Returns true if at
                least one memory block was freed.
于 2020-01-09T07:19:03.007 回答