node-osmosis icon indicating copy to clipboard operation
node-osmosis copied to clipboard

It's easy to introduce memory leaks into your app with osmosis

Open kasbah opened this issue 7 years ago • 1 comments

It seems it's super easy to introduce memory leaks into your app with osmosis by writing things like this and forgetting to add a done() call. Why not clean this up when it goes out of scope?

function runQuery(sku) {
  return new Promise((resolve, reject) => {
    const url = `http://uk.farnell.com/${sku}`
    osmosis.get(url)
      .set({image_url: '#productMainImage @src'})
      .data(resolve)
  })
}

I was bitten by this recently.

kasbah avatar Aug 26 '17 16:08 kasbah

^ agreed. The behavior to just hang is odd

justin-prather avatar Oct 24 '17 19:10 justin-prather