Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ReactiveX/RxJava
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.x
Choose a base ref
...
head repository: AttwellBrian/RxJava
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.x
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Apr 13, 2017

  1. BoundedReplayBuffer should not leak memory.

    Problem: When `BoundedReplayBuffer` evicts an item to make room for a new item it still contains a strong reference to the evicted reference.
    
    This diff adds a new unit test to verify this behavior. Given this unit test needs to look under the hood of `BoundedReplayBuffer` in order to ensure no memory leaks exist, writing this test requires a new package private method.
    
    This diff fixes the behavior.
    Brian Attwell committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    a5ca8c7 View commit details
    Browse the repository at this point in the history
  2. Prevent some additional memory leaks

    I took a look at merging the `collect()` and `collectValuesInMemory()`
    methods into a single method at the prompting of akarnokd. This made me
    realize the following:
    1) There are more memory leaks. I updated the setNext() method to fix some of these.
    2) We can't avoid all these memory leaks without introducing schduling
    because of the TimedBuffer. I don't believe engineers should have any
    expectation that the TimedBuffer values will be eagerly cleaned up after
    they timeout. So I left the seperate `collect()` and
    `collectValuesInMemory()` methods. This allows us to test memory for
    memory leaks only when we think it is appropriate.
    Brian Attwell committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    2b60da4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a772a7e View commit details
    Browse the repository at this point in the history
Loading