Skip to content

fix: only call init functions of objects once #416

Open
straker wants to merge 6 commits into
mainfrom
memory-leak
Open

fix: only call init functions of objects once #416
straker wants to merge 6 commits into
mainfrom
memory-leak

Conversation

@straker

@straker straker commented Oct 25, 2024

Copy link
Copy Markdown
Owner

Add new option to events.on to allow removing the event after the first emit. I originally had a separate once function for this, but decided it added more space to the library than just reusing the on function.

Closes #414

@straker straker changed the title Memory leak fix: only call init functions of objects once Oct 25, 2024
@straker

straker commented Dec 31, 2024

Copy link
Copy Markdown
Owner Author

Doing this requires a lot of code changes. Wondering if there's a better way to handle this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"init" callbacks cause memory leak

1 participant