C++ Object Creation: Stack vs Heap
Create object in heap when:
We explicitly want to control life cycle of object
If the object is really big (Stack is of limited size: 1MB)
Create object in heap when:
We explicitly want to control life cycle of object
If the object is really big (Stack is of limited size: 1MB)