What is the difference between the following initializations?
- new MyClass()
- MyClass()
From my understanding the first one allocates the memory on heap and returns a pointer whereas in the second case a reference to the object is returned but the object resides on stack. In both cases the default constructor is called. Please correct me if I am wrong.