Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Possible memory leak in MemoryCache #255

Open
zhibirc opened this issue Nov 14, 2023 · 0 comments
Open

Possible memory leak in MemoryCache #255

zhibirc opened this issue Nov 14, 2023 · 0 comments

Comments

@zhibirc
Copy link

zhibirc commented Nov 14, 2023

Each key points to an object with timeout: <timer_id>
Timers are all live even after deleting the actual values for which we created those timers:

MemoryCache.prototype.clear = function() {
  Object.keys(this.cache).forEach(function(key) {
    this.delete(key)
  }, this)

  return true
}

In MemoryCache.prototype.delete we care about this:

if (entry) {
    clearTimeout(entry.timeout)
  }
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant