@_RustyRooster
For C++, there is the RAII rule - resource acquisition is initialization. This means only allocate resources in a constructor and release them in the destructor. With that C++ is even better than languages with garbage collection.
@_RustyRooster
If physicists can assume spherical cows in a vacuum, C-developers can assume infinite RAM. Making it work in practice is then a DevOps problem that someone else has to solve.
@_RustyRooster
This is not completely true. If you develop your own memory allocation management code, you actually never need to free memory. You can reuse the memory allocated and you can allocate memory in large chunks to save time. Malloc and new are extremely slow.
@_RustyRooster
Not freeing memory in VC++ code had our summer internship demo crashed in front of audience which was otherwise working flawlessly on our machines.