1. if you have a game loop that runs at 60 fps, is it a good idea to have allocation/deallocation in the loop?
ans) this could lead to defragmentation, also new/delete are very slow operations. This should be avoided for these reasons.
2. What are smart pointers.
ans) they are just like regular pointers but they do their own memory management upon destruction.
3. What is the difference between an inline function and a preprocessor macro?
ans) inline functions can be accessed through the debugger and allow for type checking. Macros should be avoided in C++, and templates and inline functions should be used to replace them.
4. What is memory fragmentation?
ans) when memory gets fragmented so that you have enough memory but no chunks large enough for a dynamic allocation that you might need.
5. What is the difference between the stack and the heap?
ans) dynamic memory allocation used the heap, where as regular memory allocation by the compiler uses the stack.
6. what is the difference between references and pointers? why were references added to C++? Can you have a null reference?
ans) I don't know.
plus some other quick questions about polymorphism, vtables, and their overhead which I forget...