All of the demonstration code that I’ve seen (in, for instance, the Primer) has various objects being allocated using new, rather than being initialized by value, such as TCanvas.
Is this obligatory, to get around these variables falling out of scope when the function exits, or for another reason? Or may I use these objects by value?