Why Your Code Crashes (Stack vs Heap)
Ever passed a list to a function and it changed without you touching it? That's not a bug — that's how memory works.
In this video, I break down the two regions of memory: the stack and the heap. You'll learn why stack overflows happen, how memory leaks occur even with garbage collection, and why your data sometimes mutates unexpectedly.
This isn't abstract theory — these are the concepts that explain real bugs you've probably encountered.
What you'll learn:
- How the stack works
- Why stack overflows happen
- What the heap
- Pass by value vs pass by reference
- Memory leaks in garbage-coll…
Watch on YouTube ↗
(saves to browser)
Chapters (8)
The mystery: your data changed
0:28
Chapter 1: The Stack
1:45
Stack Overflow — Both Causes
2:24
Chapter 2: The Heap
3:27
Pass by Value vs Reference
4:04
Memory Leaks (even with GC)
4:56
Recap & Mental Model
5:24
Actionable Takeaway
DeepCamp AI