Application cleanup

Hi

Yes normally one should clean up afterwards, but in this case where the application has no classes only a simple main() method, removing layers before the main Qt event loop is called will probably cause nothing to be displayed? In the case where it implemented in a class with a destructor it would make more sense. I suppose I could do this after the exec call and will update the example accordingly.

I agree it is better to allocate objects on the stack rather than the heap where possible so memory management is automatic.

Regards

Tim

Reply