Is it good practise to create component objects on the heap instead of the stack?
If so: Why?
In the WidgetsDemo.cpp of the JuceDemo application, all the component objects I encountered are created on the heap. The same happen to all the component objects created by the GUI Editor of the Introjucer.
Does the advice from http://www.juce.com/documentation/coding-standards
If a local variable can be allocated on the stack rather than the heap, then always do so.
only hold for variables and not for (Component) objects?