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
Loading
Please register or sign in to comment