DiscardableSharedMemory should Unmap() and Close() its shared memory handle on destruction. |
|
Issue description
Failing to do so can cause a leak. For an obvious example, see
TEST(DiscardableSharedMemoryTest, CreateFromHandle) {
https://cs.chromium.org/chromium/src/base/memory/discardable_shared_memory_unittest.cc?q=base/memory/discardable_shared_memory_unittest.cc+package:%5Echromium$&l=52
The root cause of this is unclear ownership semantics for the handle in SharedMemoryHandle. Unfortunately, this can't be fixed without a really large refactor.
|
|
►
Sign in to add a comment |
|