This question is perhaps showing my JUCE naievete, but I'm wondering why ScopedPointers seem to be used so extensively in code using JUCE?
Specifically, it seems most of the classes (such as UI components) could be data members instead of separately allocated. For example, I'm creating a dialog with the Introjucer and it generates a lot of scoped pointers and calling new ImageButton, etc. when it would seem those ImageButtons could just be data members, since their lifetime would be effectively the same.
Am I missing something? Just trying to better understand JUCE :)