Commit bea501f3 authored by Diego Perez's avatar Diego Perez
Browse files

Track native allocations differently

This CL allows the DelegateManager to track native allocations once we
know the java object that will be pointing to the delegate. When we know
that relation, we can attach the lifecycle of the delegate to the
lifecycle of the java object.
Once the java object is not referenced anymore, we can dispose the
reference to the delegate. This kind of replicates the behaviour of the
NativeAllocationTracker but we do not rely on enqueing references by the
PhantomReference. With this approach, we are more active about removing
delegates instead of relying on the PhantomReference notifying us.

Bug: 78254948
Test: Existing tests pass
Change-Id: Ic58c52e93bd690646e5f34d15c76966014737528
(cherry picked from commit 4fc6e534001b94ae87c0945eebf29d97d8b34e12)
parent 1276b5e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment