Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Plugin: async IDisposable.dispose leaks memory #21982

Open
ltsSmitty opened this issue May 7, 2024 · 0 comments
Open

Plugin: async IDisposable.dispose leaks memory #21982

ltsSmitty opened this issue May 7, 2024 · 0 comments
Labels
bug Something went wrong. plug-in Related to the plugin system of OpenRCT2.

Comments

@ltsSmitty
Copy link
Contributor

Operating System

Macos

OpenRCT2 build

0.4.10

Base game

RollerCoaster Tycoon 2

Area(s) with this issue?

This is a development issue

Describe the issue

In my plugin that has an async implementation, when using IntelOrcas' async nextTick implementation with a ES5 polyfill for promises, calling dispose isn't enough to free the memory, and it leaks.

Here's the original suggested implementation, and mine that explicity sets the handle to undefined (fixes the issue).

I wonder if it's something to do with the Promise/async polyfill>JS transpilation, because I don't think this is always an issue.

Steps to reproduce

This plugin release leaks memory, where I believe the newest has fixed the problem by explicitly setting the handle to undefined.

Attachments

No response

@ltsSmitty ltsSmitty added the bug Something went wrong. label May 7, 2024
@Gymnasiast Gymnasiast added the plug-in Related to the plugin system of OpenRCT2. label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something went wrong. plug-in Related to the plugin system of OpenRCT2.
Projects
None yet
Development

No branches or pull requests

2 participants