I think the correct solution would be to do this using an “object pool pattern”. I.e. reuse the widgets instead of trying to free them.
I think the correct solution would be to do this using an “object pool pattern”. I.e. reuse the widgets instead of trying to free them.