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

Beatmap leaks memory #13

Closed
MaxOhn opened this issue Jul 2, 2024 · 0 comments · Fixed by #15
Closed

Beatmap leaks memory #13

MaxOhn opened this issue Jul 2, 2024 · 0 comments · Fixed by #15

Comments

@MaxOhn
Copy link
Owner

MaxOhn commented Jul 2, 2024

import * as fs from 'fs';
import * as rosu from "rosu-pp-js";

const file_path = `/mnt/f/osu!/beatmaps/53.osu`;
const bytes = fs.readFileSync(file_path);

while (true) {
    let beatmap = new rosu.Beatmap(bytes);
}

This MRE currently results in RAM usage steadily climbing up. This issue has most likely to do with rustwasm/wasm-bindgen#3917.

I believe the best "workaround" is to denote very clearly in the readme and documentation to call Beatmap.free manually.

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 a pull request may close this issue.

1 participant