Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b6cb992c authored by Tom Cherry's avatar Tom Cherry
Browse files

logd: replace std::vector<uint8_t> in SerializedLogChunk

Turns out std::vector::resize() and std::vector::clear() don't
actually deallocate any memory.  std::vector::shrink_to_fit() can be
used for this but isn't a 'guarantee'.  Instead of trying to get
std::vector to play nice, this change replaces std::vector<uint8_t>
with std::unique_ptr<uint8_t[]>, which is more accurate to how I'm
using this memory anyway.

Test: logging unit tests
Change-Id: I9638e90bbf50bcf316c5aa172c8278ea945d27e7
parent b07e339b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment