You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to extend(gui), later do gui.shutdown() and once againextend(gui).
Currently gui adds listeners for key presses and maintains mutable lists which are not cleared on shutdown. It seems to assume that a program has one gui which exists for the duration of the program.
More generally, there's gui.add() but no gui.remove(), there's program.extend() but no program.drop().
Help make it happen!
I am willing to submit a PR to implement this change, but would need some guidance.
The text was updated successfully, but these errors were encountered:
On that note, I see a similar problem with [orx-compositor].
There are funtions provided ike deepDestroy that would allow cleanup, but the important vars themselfs are kept private.
This follows the same logic of providing creation, but no kind of destruction.
In general, I would welcome opening up resources to follow the acquire-release pattern.
This allows for dynamic usage of resources, acquiring and releasing them as needed.
Note:
My personal motivation is using orx-compisitor for scenes (like theaters scenes) were I have to cleanup resources after a scene completes. (I define many scenes in advance, but only one is in active use at any point.)
I hope it's understandable how this benefit similar dynamic projects.
Admittedly orx-compositor is written entirely without thinking of releasing resources.
OPENRNDR has a hidden resource manager provided by Session, it is primarily used to release resources in the live coding mode provided by orx-olive. It may be worthwhile to formalize/untangle what Session does and document the API. It may be possible to create a scene inside a Session scope and have all the resources cleaned up automatically by closing the session.
Motivation
I would like to be able to
extend(gui)
, later dogui.shutdown()
and once againextend(gui)
.Currently gui adds listeners for key presses and maintains mutable lists which are not cleared on shutdown. It seems to assume that a program has one gui which exists for the duration of the program.
More generally, there's
gui.add()
but nogui.remove()
, there'sprogram.extend()
but noprogram.drop()
.Help make it happen!
I am willing to submit a PR to implement this change, but would need some guidance.
The text was updated successfully, but these errors were encountered: