Boost 单例池 release_memory 对比 purge_memory

Boost Singleton Pool release_memory vs purge_memory

我在哪里可以找到 Boost Singleton Pool 中 purge_memoryrelease_memory 之间的区别?在 here 它说:

Singleton Usage is the method where each Pool is an object with static duration; that is, it will not be destroyed until program exit. Pool objects with Singleton Usage may be shared; thus, Singleton Usage implies thread-safety as well. System memory allocated by Pool objects with Singleton Usage may be freed through release_memory or purge_memory.

单击页面上的几个链接会引导 to this page

您可以阅读以下内容:

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.