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

control_destroy can't accept any actual controls, because of type #15

Open
delkano opened this issue Apr 18, 2019 · 0 comments
Open

control_destroy can't accept any actual controls, because of type #15

delkano opened this issue Apr 18, 2019 · 0 comments

Comments

@delkano
Copy link

delkano commented Apr 18, 2019

I am trying to delete a box, with all its children.
I believe there are two possible ways to do this, but I haven't manage to make work any of them.
I can use box_delete on the parent, with the index to delete. This works, but does cause memory leaks, because the controls are not actually destroyed, only removed from the UI.

What I need to use is control_destroy. However, because of how Crystal type works, there doesn't seem to be any way to convert a, for example, UI::Box into a UI::Control. Therefore, control_destroy isn't actually usable in any way I can find.

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

1 participant