question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This imitate code seem to leak, doesn’t it?

import xs from 'xstream'
import delay from 'xstream/extra/delay'

let proxy$ = new xs.createMimic()

let source$ = proxy$.startWith(1).map(x => x*2)
  .debug(x => console.log('source$ tap', x))  

let result$ = source$.compose(delay(1000))

proxy$.imitate(result$)

result$
  .take(4)
  .addListener({
    next: x => console.log('x', x),
    error: () => {},
    complete: () => {}
  })
source$ tap 2
x 2
source$ tap 4
x 4
source$ tap 8
x 8
source$ tap 16
x 16
source$ tap 32 // here a leak starts
source$ tap 64
source$ tap 128
....

http://www.webpackbin.com/E17QfBUVb

I was pretty sure that imitate should protect from such leak that was (actually is) a problem with rx proxy subjects.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:27 (27 by maintainers)

github_iconTop GitHub Comments

1reaction
staltzcommented, Jun 13, 2016

I think I just need to build a cycle detection system to cleanup those cycles. Seems unavoidable.

1reaction
wclrcommented, Jun 13, 2016

@staltz it leaks in 5.0.3 http://www.webpackbin.com/NyZXA0v4b (see the console) change the leak test as I pointed in the comment above

Read more comments on GitHub >

github_iconTop Results From Across the Web

Brilliant Ideas You Should Imitate To Fix Leaking Pipes ...
Here I started a project on how to repair a leaking water pipe or a damaged water pipe without using glue and also...
Read more >
Chewy Mane -Imitating(LEAK) - SoundCloud
Stream Chewy Mane -Imitating(LEAK) by Chewy Mane on desktop and mobile. Play over 265 million tracks for free on SoundCloud.
Read more >
Understanding the term "information leak" used in "Imitation ...
I'm having problems undestanding this term, how can the information leak? Can someone please explain this with an example, or something that ...
Read more >
Spontaneous Intracranial Hypotension: Atypical Radiologic ...
Here we discuss conditions that mimic the radiologic and clinical presentation of spontaneous intracranial hypotension as well as other disorders that CSF leaks...
Read more >
Information leakage, imitation, and the patent system - EconStor
recursive system of equations on knowledge leakage and imitation that, among other factors, ... Keywords: Innovation, R&D, Imitation, Dissemination, Patents.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found