-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix memory leak in Completable/Single Processors (#2114)
Motivation: `Processors.new[Single|Completable]Processor` create a `Processor`s that permit multiple subscribers. The underlying datastructure is `ClosableConcurrentStack` that makes a best effort to remove items on cancellation by setting the `Subscriber` reference to `null`. However it doesn't attempt to remove the `Node` which can lead to a memory leak until `close(..)` is called. This may not happen in scenarios that perpetually retry operations that are failing continuously for prolonged periods of time. Modifications: - `ClosableConcurrentStack` makes a best effort to remove the `Node` object from the stack in `relaxedRemove`. Result: Memory leak fixed.
- Loading branch information
1 parent
2f80575
commit 096d4d2
Showing
2 changed files
with
20 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters