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

Glade should have a process for unloading screens #15

Open
4 tasks
profexorgeek opened this issue Feb 13, 2023 · 2 comments
Open
4 tasks

Glade should have a process for unloading screens #15

profexorgeek opened this issue Feb 13, 2023 · 2 comments
Assignees

Comments

@profexorgeek
Copy link
Owner

Screens currently have no unloading process to dispose of textures, sprites, layers, etc.

  • Glade should be updated so that screens have an unloading process.
  • The base Screen class should have a virtual unload method
  • Sprites should be recursively unloaded and destroyed on unload
  • As part of unloading the LayerManager should clear any layers
@profexorgeek profexorgeek self-assigned this Feb 13, 2023
@profexorgeek
Copy link
Owner Author

@KallDrexx I know you changed the unloading process recently. Have you completed any/all of these requirements

@KallDrexx
Copy link
Collaborator

Screen unloading is done by TransitionToScreen(), which will call Dispose() on the screen if it implements IDisposable: https://github.com/profexorgeek/Glade2d/blob/main/Glade2d/Game.cs#L107

Not sure if there's more to it that's needed.

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