[cleanup] Use unique_ptr for MemoryAllocator in Heap
Also drive-by cleanup the TestMemoryAllocatorScope class so that it takes ownership of the old allocator while it holds onto it, and so that the MemoryAllocator for testing is constructed inside the scope rather than passed into it. This means users don't need to explicitly call TearDown() and delete the allocator as the scope does it for them. Change-Id: Id7da3c074618a376d2edfe3385bb185ba8287cea Reviewed-on: https://chromium-review.googlesource.com/c/1392194 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#59627}
Showing
Please
register
or
sign in
to comment