How can I force the STL memory cache to clear?

后端 未结 2 1975
滥情空心
滥情空心 2021-01-18 08:34

I have a class which has a field of type unordered_map. I create a single instance of this object in my application, which is wrapped in a shared_ptr

2条回答
  •  猫巷女王i
    2021-01-18 09:23

    There's no guarantee that your application will free the memory back to the OS. It's still available for your application to use but the OS may not reclaim it for general use until your application exits.

提交回复
热议问题