mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
PollSource keeps a strong reference to the FdExecutor, which can lead to a memory leak via a circular reference if the caller spawns a future that owns a PollSource and then detaches it. Avoid this by using weak references instead. With this change, we now only use weak references internally. The only way to increase the strong reference count is by cloning the FdExecutor. BUG=none TEST=unit tests Change-Id: Ic58ff475a31c6fca831c3ced73b26b87ceeda028 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2760378 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Dylan Reid <dgreid@chromium.org> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
.build_test_skip | ||
Cargo.toml |