Eel icon indicating copy to clipboard operation
Eel copied to clipboard

Fixing memory leak that leaves values and callbacks in memory indefinitely

Open nosachamos opened this issue 4 years ago • 3 comments

Keeping track of return values that arrive before callbacks are registered, and then delivering to the callbacks when they are registered.

This fixes a major memory leak currently in Eel, as reported in https://github.com/ChrisKnott/Eel/issues/540

Tested extensively locally.

See that values no longer accumulate when many rapid calls to JS are performed:

image

nosachamos avatar Oct 21 '21 17:10 nosachamos

@ChrisKnott this is an important one... may warrant a new release, perhaps?

nosachamos avatar Oct 21 '21 17:10 nosachamos

@ChrisKnott this is an important one... may warrant a new release, perhaps?

Yes, I think so. One thing I never really thought about was that people would make apps with Eel that run for hours.

I have had a lot of Life Stuff last couple of years but from this week I will have Friday afternoons free so hopefully I can finally get back to making progress on this project. It's kind of got away from me atm 😅...

ChrisKnott avatar Nov 01 '21 20:11 ChrisKnott

Hey @nosachamos - this looks like it'd be really good for us to get in. I'm aware it's been a long time since you contributed this - sorry.

If you still have context, do you think you'd be able to add a test that can demonstrate the memory leak is fixed (and will therefore protect against regressions in the future)

samuelhwilliams avatar Dec 11 '22 10:12 samuelhwilliams