Stack vs Heap Memory - Simple Explanation

preview_player
Показать описание
I take a look at Stack and Heap Memory and how it affects your application. Knowing how memory is handled in your application can help you understand your variables' scopes.

🎓 RECOMMENDED COURSES (Use code FRIENDS10 for 10% off)

📚 RECOMMENDED BOOKS
Software Development

🚀 MY FAVOURITE TOOLS

⏳ TIMESTAMPS
00:00 Introduction
00:18 Three main parts
00:28 Stack data structure
00:51 Call stack
01:19 Heap differences
01:50 Variable storage rules
01:58 Value types and reference types
02:23 Local variables
02:40 Reference types on heap
02:57 Value types on heap
03:20 Garbage collector
03:53 Exceptions to the rule
04:40 Asynchronous methods

You can check out more of my favourite tools on my website:

🔗 MY KEY LINKS

🧑‍💻WHO AM I

‼️ DISCLAIMERS
Some of the links in this description are affiliate links, for which I get a small commission, at no extra cost to you 🙂. I appreciate you supporting my channel so I can continue providing you with free software development content!

#coding #programming #developer
Рекомендации по теме
Комментарии
Автор

These ideas were saved in my head as a sequence of words for the entirety of my undergrad. If 5 short minutes you managed to actually help me understand a huge gap in my understanding. Thank you so much.

michaeltheisen
Автор

YOU ARE LITERALLY CAPABLE OF REPLACING 99 PERCENT OF TEACHERS WHO PATHETICALLY FAILED TO TEACH ME THIS CONCEPT. THE CLARITY WITH WHICH YOU JUST EXPLAINED IT SHOWS THE TRUE MASTERCLASS YOU ARE IN. I WISH I DINT WASTE MONEY IN COLLEGE WHEN PEOPLE LIKE YOU EXIST. LOVE YOU SIR ❤

christymathew
Автор

I've seen multiple videos of you now... you can explain the essence of things very well. It's a talent. Very good. Thank you!

b
Автор

This is one of the best programming related videos I have ever watched. It cleared up so much of my confusion in C++.

kohltonpeterson
Автор

Not gonna lie, i cant state enough how explanations like this can massively improve your understanding of why code works the way it does. Just learning to code is one thing, but understanding whats behind all of it and WHY whatever thing actually is happening, can definitly up your game. Im not a pro by any means, but i think stuff like this is very important.
The visual presentation also makes it way easier to follow and connect the concepts - so thx for that 😊

luminuslux
Автор

Alex, you made my day. I would call you one of the best instructors! Your explanations are flawless. You explain perfectly in context. For instance, where you explain why variables are not accessible outside the method.

JakeeReacher
Автор

I've been coding, and teaching code for the past 4 years. This video blew me away. Explained everything so well, and was incredibly easy to follow. Sorry, Alex, I will be stealing this! Amazing work, and you've got a new fan! Thank you!

awys
Автор

Reading a book right now that explains this concept rather poorly over 20 pages. You managed to grant me understanding in 5 minutes, and now I can continue reading past the chapter. Thank you, great explanation!

scubagoblin
Автор

This video actually answered all my questions about how the stack and heap work together. Great explanation!

RYANCARNEY-dcqe
Автор

Insanely useful video, didn't think i'd learn that much in just under 6 minutes, thank you.

Nicolas-L-F
Автор

The analogy of a stack of books provided much needed clarity for me. I appreciate the video mate!

patrickmccarthy
Автор

Your videos are awesome and very clear.
Can't wait for a full CS playlist. Thanks for what you do for the community Alex.

fuadadio
Автор

such a clear explanation couldn't get better thanks Alex

brunofilgueiras
Автор

Thank you sir. Good Explanation.
Please, I wish you make a video on "Why in Java, Do Local Variables Used in Lambdas Have to Be Final or Effectively Final?" and please make the explanations at the memory level too, so we can understand all the mechanics behind it.

Tanessok
Автор

Finally a much simpler with actual sample code that explain the whole stack and heap stuff. Now I understand why and when OOM occurs in app, the usual suggestion is to increase heap size but said to be slow or when we do recursion recklessly we get stackoverflow.

bitwisedevs
Автор

My jaw dropped when you explained what happens to variables declared in the stack, I never made the connection between this fact and the scope of variables, thank you soooo much !!!

bsy
Автор

This explanation was exactly what I needed! thank you Alex

benessilfie
Автор

I can't put into words how helpful this video was. Thank you Alex!

austinhummel
Автор

Finally I understand the difference in few words and short time... keep doing videos like this

AhmedAlsabsab
Автор

This is an excellent video about how the memory works, I love the last part about asynchronous methods. Thank you for this awesome content. I wish you could speak more about asynchronous functions. 😃

alexsal