commit | 05322879380a15f7042f4023b4ce4fec4b8bf50b | [log] [tgz] |
---|---|---|
author | Alex Deymo <deymo@google.com> | Wed Sep 30 09:50:24 2015 -0700 |
committer | Alex Deymo <deymo@google.com> | Wed Sep 30 11:25:44 2015 -0700 |
tree | 62c634aa1148456ef763c7b82945332ec14e398a | |
parent | 7599e6cd37cba44d63b3adb278499ced01c81ef0 [diff] |
Transfer memory ownership when stacking ExtentWriters. The ExtentWriter implementations are meant to be stacked in a way that the underlying extent writer can't be reused. Calling End() on the top of the stack will call End() on every ExtentWriter. This patch enforces this design decision in the interface transfering the ownership of the ExtentWriter when stacking them using a unique_ptr instead of a plain pointer. Bug: 23604708 Test: Updated unittests. Change-Id: Ie3b5b9cbb3058359c487a783f6fb3c0ac65bde00