Week 8 Day 2 - Memory Leaks, RPG 41

Channel:
Subscribers:
2,700
Published on ● Video Link: https://www.youtube.com/watch?v=CrrdvvavzH0



Duration: 1:13:51
116 views
1


Today we went over a common problem when dealing with linked lists, the memory leak. It's not as bad as a memory corruption or seg fault or other crashing bug, but it's still bad, since it will increase memory consumption over time. Remember that for every new, you need a delete. The best way of handling this is to only do news in a constructor, and deletes in a destructor. RAII is what this is called in C++.


We then went over the next homework assignment, which is an open ended creative project where you get to make a Role Playing Game (RPG) with a partner, using everything we've learned so far in this class.







Tags:
csci41
rpg
memory leak