Made a video explaining how memory ACTUALLY works in C++ (Stack vs Heap, new/delete) — feedback welcome
▲ 0 r/ProgrammerTIL+2 crossposts

Made a video explaining how memory ACTUALLY works in C++ (Stack vs Heap, new/delete) — feedback welcome

Hey everyone,

I put together a video on Dynamic Memory Allocation in C++ — part of an OOP series I'm building for people prepping for interviews/DSA who want solid fundamentals, not just surface-level definitions.

Covers:

  • Stack vs Heap — the real differences, not just textbook definitions
  • Why taking array size as user input on the Stack is a bad idea (and often breaks across compilers)
  • How new actually allocates on the Heap at runtime
  • Why you need a pointer on the Stack to access Heap data
  • Using delete properly to avoid memory leaks

I tried to explain the "why" behind these concepts since most tutorials just show syntax without explaining what's actually happening in memory.

Link: https://youtu.be/JxrYh3xUF54

Would love feedback — anything unclear, anything you'd want covered next in the series (constructors/destructors, virtual functions, etc.), or just general thoughts. Not trying to spam, genuinely want to make this series useful.

Thanks!

u/Silver_Court_3399 — 3 days ago