[core] Simplify util::peer

Remove custom vtable, base implementation on `std::unique_ptr`.
This commit is contained in:
Mikhail Pozdnyakov
2019-02-07 12:13:19 +02:00
parent 96ec18376f
commit 810999fadf
3 changed files with 31 additions and 115 deletions

View File

@@ -133,7 +133,7 @@ namespace android {
// Release the peer relationships. These will be re-established when the source is added to a map
assert(ownedSource->peer.has_value());
ownedSource->peer.get<std::unique_ptr<Source>>().release();
ownedSource->peer.reset();
ownedSource->peer = util::peer();
// Release the strong reference to the java peer
assert(javaPeer);