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

Should owlContextDestroy be called when the app ends? #223

Open
buaayhq opened this issue Dec 2, 2024 · 1 comment
Open

Should owlContextDestroy be called when the app ends? #223

buaayhq opened this issue Dec 2, 2024 · 1 comment

Comments

@buaayhq
Copy link

buaayhq commented Dec 2, 2024

In the cmdline samples, at the end of the main function, owlContextDestroy or other release related functions were called. But in the interactive samples, Release related functions were omitted. Should owlContextDestroy be called?

@ingowald
Copy link
Contributor

In theory, yes, it would certainly be "cleaner" to do that - but for the samples it probably doesn't make much difference. When an app terminates, all the data structures allocated by OWL will automatically get released back to the OS, anyway, so it doesn't make much difference whether we do so or not.
The reason OWL still has these functions is that for some applications the user may want to release all the OWL-allocated resesources but not yet terminate the app itself - maybe even do that several times in a loop (say once per frame rendered), so it's important that OWL has some functions to reliably release all data - but for what happens after a sampler terminates it won't do much of a difference.

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

No branches or pull requests

2 participants