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

Call ipatch_close() #643

Closed
derselbst opened this issue May 1, 2020 · 2 comments
Closed

Call ipatch_close() #643

derselbst opened this issue May 1, 2020 · 2 comments
Labels

Comments

@derselbst
Copy link
Member

Fluidsynth should call ipatch_close() to avoid memory leaks. This could be done by keeping track of created settings xor synth instances: When all instances of either type have been destoryed, call ipatch_close(). When the first instance is created again, call ipatch_init(). Need to figure whether settings or synth is more appropriate.

@derselbst derselbst added the bug label May 1, 2020
@derselbst
Copy link
Member Author

... or make use of swami/libinstpatch#47 and always call ipatch_init() in new_fluid_synth() and ipatch_close() in delete_fluid_synth()

@jjceresa
Copy link
Collaborator

jjceresa commented May 1, 2020

always call ipatch_init() in new_fluid_synth() and ipatch_close() in delete_fluid_synth()

This is the good solution and will work safely only if swami/libinstpatch#47 is applied. Otherwise Swami will fail (memory violation) during its deinitialization step because libinstpatch was already deinitialized by fluidsynth plugin when unloaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants