{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/4494","repository_url":"https://api.github.com/repos/ReactiveX/RxJava","labels_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/4494/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/4494/comments","events_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/4494/events","html_url":"https://github.com/ReactiveX/RxJava/issues/4494","id":175513629,"number":4494,"title":"cache() and replay() keep strong references to the upstream even after the result has been cached","user":{"login":"hospitalitarian","id":1021051,"avatar_url":"https://avatars.githubusercontent.com/u/1021051?v=3","gravatar_id":"","url":"https://api.github.com/users/hospitalitarian","html_url":"https://github.com/hospitalitarian","followers_url":"https://api.github.com/users/hospitalitarian/followers","following_url":"https://api.github.com/users/hospitalitarian/following{/other_user}","gists_url":"https://api.github.com/users/hospitalitarian/gists{/gist_id}","starred_url":"https://api.github.com/users/hospitalitarian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hospitalitarian/subscriptions","organizations_url":"https://api.github.com/users/hospitalitarian/orgs","repos_url":"https://api.github.com/users/hospitalitarian/repos","events_url":"https://api.github.com/users/hospitalitarian/events{/privacy}","received_events_url":"https://api.github.com/users/hospitalitarian/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ReactiveX/RxJava/labels/Question","name":"Question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-09-07T14:14:25Z","updated_at":"2016-09-08T16:07:44Z","closed_at":null,"body":"This causes code like the following to be a memory leak when it doesn't intuitively feel like it should be one:\r\n```java\r\nObservable obs = Observable.just(largeObject1, largeObject2, largeObject2).last().replay();\r\n```\r\n\r\nI would be happy to submit a patch for this if the idea behind this change has approval."},"comment":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/comments/245649300","html_url":"https://github.com/ReactiveX/RxJava/issues/4494#issuecomment-245649300","issue_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/4494","id":245649300,"user":{"login":"akarnokd","id":1269832,"avatar_url":"https://avatars.githubusercontent.com/u/1269832?v=3","gravatar_id":"","url":"https://api.github.com/users/akarnokd","html_url":"https://github.com/akarnokd","followers_url":"https://api.github.com/users/akarnokd/followers","following_url":"https://api.github.com/users/akarnokd/following{/other_user}","gists_url":"https://api.github.com/users/akarnokd/gists{/gist_id}","starred_url":"https://api.github.com/users/akarnokd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akarnokd/subscriptions","organizations_url":"https://api.github.com/users/akarnokd/orgs","repos_url":"https://api.github.com/users/akarnokd/repos","events_url":"https://api.github.com/users/akarnokd/events{/privacy}","received_events_url":"https://api.github.com/users/akarnokd/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T16:07:44Z","updated_at":"2016-09-08T16:07:44Z","body":"It the source of replay runs to termination, the `ConnectableObservable.connect()` will subscribe to it again. `connect` has no effect on an already running but not yet terminated `ConnectableObservable`."}}
{"actor":{"display_login":"akarnokd"}}