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

IOS App plugin never gets deconstructed #1077

Open
AlexHarker opened this issue Mar 17, 2024 · 5 comments
Open

IOS App plugin never gets deconstructed #1077

AlexHarker opened this issue Mar 17, 2024 · 5 comments
Labels
bug Something isn't working ios Issue relates to iOS

Comments

@AlexHarker
Copy link
Collaborator

Various calls to dealloc never happening the IOS app, and thus the plugin itself never gets deconstructed (there is a call to delete it in a dealloc, but that never happens).

This has not been tested for the plugin.

@AlexHarker AlexHarker added bug Something isn't working ios Issue relates to iOS labels Mar 17, 2024
@olilarkin
Copy link
Member

could you be more specific?

@olilarkin
Copy link
Member

When the app gets terminated all memory is freed by the os, dealloc etc is bypassed. If you needed the ability to unload the audiounit, then that could be added to a customised IPlugAUPlayer. Hopefully the dealloc in IPlugAudioUnit would be called then. I tried the AUv3 in AUM and dealloc is called when the plugin is unloaded.

@AlexHarker
Copy link
Collaborator Author

Yes - I'm not worried about memory allocation here - I was using the app wrapper and saving some settings on quit, which is fine on desktop, but not on IOS as an app - for now I'm doing that elsewhere (which is arguably a better pattern), but importantly if anyone is assuming that whatever is constructed will get a call to the destructor then that isn't true.

Glad it works correctly in AuM - this is probably non-urgent, but my assumption was that my settings would get saved when I quit the app, but that wasn't the case.

@olilarkin
Copy link
Member

A common thing to do on iOS is to write to the App's userdefaults. I am currently working on persisting stuff there

@olilarkin
Copy link
Member

probably including the last plugin state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ios Issue relates to iOS
Projects
None yet
Development

No branches or pull requests

2 participants