Skip to content

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

@delkano

Description

@delkano

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions