In the current form, SequencedTaskRunner::DeleteSoon() may lead to memory leaks during shutdown, for the case where it returns |true|, because there's no guarantee about whether the task will run or not.
Some callers have worked this around on the calling site, e.g.: https://cs.chromium.org/chromium/src/base/threading/post_task_and_reply_impl.cc?l=57&rcl=789766a26dc5f1009c20450489ab6ea1841c7495
There's also a related TODO(akalin) in SequencedTaskRunner to "Get rid of the boolean return value for the methods".
My personal proposal would be to introduce more specifics functions like:
1. DeleteSoonOrLeak.
2. DeleteEventuallyInAnySequence
thakis@: does this make sense?
Comment 1 by dtapu...@chromium.org
, Aug 24