New issue
Advanced search Search tips

Issue 866512 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

SequencedTaskRunner::DeleteSoon() should annotate memory leaks

Project Member Reported by mastiz@chromium.org, Jul 23

Issue description

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?
 
Components: Internals>Core

Sign in to add a comment