deleteAllChildren crashes resizable AudioProcessorEditor

An AudioProcessorEditor made resize-able with setResizable() crashes @ deleteAllChildren().

(While I think there is a general misconception of ownership at least deleteAllChildren() comes handy to hack around that. Anyways as useful it seems as hacky it is.)

Ah, the old deleteAllChildren() method - that is LONG overdue for being deprecated!

It’s really best to never use it in your own code, it leads to all kinds of gotchas like this one.

1 Like

Thanks, Jules,
so this sounds like deleteAllChildren() never was meant for the use outside of the framework?
If I remember correctly, there were some ownership issues with Drawables, which forced us to deleteAllChildren() at various occasion, which in turn prevented an appropriate ownership relation for those cases. In the meantime because of various unsolvable issues with Drawables we had to replace them completely. So now we probably should replace all deleteAllChildren() with something else also.

It was written long before unique_ptr and even ScopedPointer existed, and yes, it does ring a bell that there were some issues with Drawable, but I’m sure it could be deprecated, even if Drawable needs to use a similar trick internally.