Why Your Code Crashes (Stack vs Heap)

LearnThatStack · Beginner ·🛠️ AI Tools & Apps ·4mo ago
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-collected languages Timestamps: 0:00 - 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 More Videos : Software Egineering Basics - https://www.youtube.com/playlist?list=PLWP-VtjCVpWyLNBm3zz_sGyC5mVwiAOvj Software Design - https://www.youtube.com/playlist?list=PLWP-VtjCVpWx7kPq30XRN6O6LjVQ4VL95 #programming #coding #developer #computerscience #memory #tutorial
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related AI Lessons

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
Up next
China's New Qwen 3.7 is INSANE!
Julian Goldie SEO
Watch →