I see on the bug that there was an earlier fix targeting the same memory increase:
https://crrev.com/c/4054426
Make sure to std::move `event.window_` in the move constructors to
properly release the raw_ptr being moved and to avoid quarantine bloat.
Did you need to fix this AND remove memset to avoid the quarantine bloat, or was just one of them enough?
The diff was
Event::Event(Event&& event)
: send_event_(event.send_event_),
...
< window_(event.window_) {
> window_(std::move(event.window_)) {
If I understand right, the original version of that copied the `window_` raw_ptr, which would increase the refcount. Then after the move, the original `event` is in an undefined state, so when it goes out of scope its destructor (and its members destructors don't run), so it never release's its ref to the raw_ptr. Did I get that right?
Would a shared_ptr or scoped_refptr have the same error if someone accidentally copied them instead of moving in a move constructor? I find that surprisingly fragile.
Thanks,
Joe