Memory Management Flashcards
1
Q
C++ requires manual memory management using new and delete or smart pointers.
A
Memory management
2
Q
manage memory automatically using reference counting
A
Smart pointers
unique_ptr
shared_ptr
3
Q
when allocated memory is not freed
A
You have a MEMORY LEAK
4
Q
How can memory leaks be prevented
A
proper resource management and using smart pointers in C++
5
Q
A