Тёмный

Stack vs Heap Memory - Simple Explanation 

Alex Hyett
Подписаться 39 тыс.
Просмотров 194 тыс.
50% 1

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.
☕️ I don’t accept paid sponsorships and I have turned off mid-video ads. You’re welcome! If you would like to support my channel see: ko-fi.com/alexhyett
📨 Join my free weekly newsletter for advice, technology and more: newsletter.alexhyett.com
🗺️ Backend Developer Roadmap: www.alexhyett.com/backend-dev...
📝 Blog Post: www.alexhyett.com/stack-vs-he...
🎓 RECOMMENDED COURSES (Use code FRIENDS10 for 10% off)
The Complete Web Developer Course - academy.zerotomastery.io/a/af...
The Complete Junior to Senior Web Developer Roadmap - academy.zerotomastery.io/a/af...
Complete SQL + Databases Bootcamp - academy.zerotomastery.io/a/af...
📚 RECOMMENDED BOOKS
Software Development
Clean Code - geni.us/5AEwj2
Clean Architecture - geni.us/yBrTX
Domain Driven Design - geni.us/WiR0Q0x
Design Patterns - geni.us/5ncUt
Developer Hegemony - geni.us/lAXy
Pragmatic Programmer - geni.us/GfNj9
Data Structures and Algorithms Made Easy - geni.us/sqg6kJ
Refactoring - geni.us/ufAP0mE
The Productive Programmer - geni.us/IT9WiN
Pragmatic Thinking and Learning - geni.us/x81A
Test Driven Development - geni.us/HFV52
Microservices - geni.us/8vMA
🚀 MY FAVOURITE TOOLS
Visual Studio Code - code.visualstudio.com/
Obsidian - obsidian.md/
Notion - affiliate.notion.so/alexhyett
⏳ 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:
www.alexhyett.com/tech/
🔗 MY KEY LINKS
🌍 Blog - www.alexhyett.com/
🐘 Mastodon - social.alexhyett.com/@alex
🧑‍💻WHO AM I
I'm Alex, a Software Developer and RU-vid working in the UK. I make videos about software development to help developers with the skills they need to be senior developers. As well as this RU-vid Channel, I also write articles on my website (alexhyett.com) as well as write a regular newsletter that contains some thoughts to help aspiring developers.
‼️ 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

Опубликовано:

 

16 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 259   
@michaeltheisen
@michaeltheisen Год назад
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.
@alexhyettdev
@alexhyettdev Год назад
You're welcome Michael, I am glad it helped.
@saumyojitdas4212
@saumyojitdas4212 8 месяцев назад
​@@alexhyettdev public class Main { String s = "ABC"; public static void main(String[] args) { Main obj = new Main() ; System.out.println(obj.s); } } in this above code String object is created in heap and also of class. So 2 objects in heap. But isn't the string object Abc resides inside class object in the heap?that's why we are calling it obj.s
@rembautimes8808
@rembautimes8808 4 месяца назад
Good video very in-depth
@crazychase443
@crazychase443 3 месяца назад
i feel the exact same way!! this random collection of words and statements now i feel like concrete concepts in my brain
@RYANCARNEY-dc2qe
@RYANCARNEY-dc2qe Месяц назад
This video actually answered all my questions about how the stack and heap work together. Great explanation!
@luminuslux
@luminuslux Год назад
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 😊
@alexhyettdev
@alexhyettdev Год назад
Thank you, I am glad you enjoyed the video. I find it helps with remembering everything as well. If you can understand something then it tends to stick in your mind a bit better.
@based6457
@based6457 Год назад
Perfect, really good explanation. Thank you!
@fuadadio
@fuadadio 4 дня назад
Your videos are awesome and very clear. Can't wait for a full CS playlist. Thanks for what you do for the community Alex.
@bitwisedevs469
@bitwisedevs469 4 месяца назад
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.
@csanid1
@csanid1 4 месяца назад
hey this is an excellent video! i'd never thought or read about the link between variable scope and memory. thank you so much!
@JakeeReacher
@JakeeReacher Год назад
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.
@alexhyettdev
@alexhyettdev Год назад
Jake, you made my day! Thank you for the lovely comment. I am glad you found it helpful!
@brunofilgueiras3518
@brunofilgueiras3518 14 дней назад
such a clear explanation couldn't get better thanks Alex
@christymathew9035
@christymathew9035 17 дней назад
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 ❤
@balajia.t1487
@balajia.t1487 4 месяца назад
A nice and concise explanation . Wishing you all the best for better reach of your subsequent tutorials so a lot from community would benefit
@benessilfie
@benessilfie Год назад
This explanation was exactly what I needed! thank you Alex
@alexhyettdev
@alexhyettdev Год назад
You’re welcome I am glad it helped!
@kohltonpeterson3287
@kohltonpeterson3287 6 месяцев назад
This is one of the best programming related videos I have ever watched. It cleared up so much of my confusion in C++.
@alexhyettdev
@alexhyettdev 6 месяцев назад
Thank you!
@alexsal6069
@alexsal6069 4 месяца назад
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. 😃
@patrickmccarthy7124
@patrickmccarthy7124 Год назад
The analogy of a stack of books provided much needed clarity for me. I appreciate the video mate!
@alexhyettdev
@alexhyettdev Год назад
You’re welcome, I am glad it was helpful.
@amalekilawlor2922
@amalekilawlor2922 Год назад
Wow this was an incredible series of topics, thank you!
@alexhyettdev
@alexhyettdev Год назад
Thanks, I’m glad you enjoyed it!
@AhmedAlsabsab
@AhmedAlsabsab 19 дней назад
Finally I understand the difference in few words and short time... keep doing videos like this
@Mythical_Beastinator
@Mythical_Beastinator Год назад
Very well explained. Thank you!
@alexhyettdev
@alexhyettdev Год назад
Thank you, I am glad you liked it!
@wajdwael8775
@wajdwael8775 2 месяца назад
That is a great, clear, and easy explanation, thank you.
@dorianneto2859
@dorianneto2859 Год назад
Such an intuitive and simple explanation!
@alexhyettdev
@alexhyettdev Год назад
Thank you, I am glad it was helpful.
@PabloDelafuria
@PabloDelafuria 10 дней назад
Great video, great explanation! Thanks
@timi_t_codes
@timi_t_codes 11 месяцев назад
Thanks for this simple and straight to the point explanation
@alexhyettdev
@alexhyettdev 11 месяцев назад
You’re welcome!
@paulventura3118
@paulventura3118 Год назад
Great explanation! Thanks Alex!
@alexhyettdev
@alexhyettdev Год назад
You’re welcome!
@potatopotato4676
@potatopotato4676 4 месяца назад
Your explanations are immaculate! You'll definitely make it big if you want to. I am glad I caught your channel early at 18.4k subscribers
@alexhyettdev
@alexhyettdev 4 месяца назад
I appreciate that! Will be making more videos soon.
@Freepackman
@Freepackman Год назад
absolutely brilliant explanation, thanks a lot
@alexhyettdev
@alexhyettdev Год назад
Thanks, I am glad it was useful!
@chocolate_Almonds
@chocolate_Almonds 11 месяцев назад
Dude, that was awesome. You explained what I tried to wrap my head around in college courses, in 5 minutes. ily :)
@alexhyettdev
@alexhyettdev 11 месяцев назад
Thank you! 👍
@nomymathieu-petrin5672
@nomymathieu-petrin5672 Год назад
A hidden gem !!! Thanks you so much, I understand it so much better now !!!!
@alexhyettdev
@alexhyettdev Год назад
I am glad it helped!
@kasunsaumya3151
@kasunsaumya3151 10 месяцев назад
Simply love your explanations.. Clean and deep..
@alexhyettdev
@alexhyettdev 10 месяцев назад
Thank you! 🙏
@gavinmeeker287
@gavinmeeker287 Год назад
Really great video! This helped so much
@alexhyettdev
@alexhyettdev Год назад
Thank you I appreciate the kind words. I am glad it was helpful.
@JHatLpool
@JHatLpool 4 месяца назад
Very nice explanation. Thanks !
@may8128
@may8128 Год назад
Loved the explanation !
@alexhyettdev
@alexhyettdev Год назад
Thank you! I am glad it was helpful.
@triphazard2906
@triphazard2906 Год назад
lovely explanation, thank you for this
@alexhyettdev
@alexhyettdev Год назад
You’re welcome! I am glad it was useful.
@billbasdras5568
@billbasdras5568 4 месяца назад
That's good stuff ❤ subscribed
@davidjiang7929
@davidjiang7929 3 месяца назад
Thanks for the great explanations!
@agun214
@agun214 Месяц назад
hell yeah. idk how you did it but that finally made sense. i had to have heard the stack of books analogy before, but this is probably the first time seeing it played out with actual books imma have to watch this again
@polimorphic13
@polimorphic13 2 месяца назад
Excellent explanation. Thank you so much.
@tejassravanthikasulanati4733
@tejassravanthikasulanati4733 День назад
thats lot of info, more than what i was looking for. 👍
@jesusromero9167
@jesusromero9167 25 дней назад
Great explanation!
@SSn0wx
@SSn0wx 5 месяцев назад
Great explanation. I do mostly web development, but I've been getting into low-level programming recently, and your video really helped me reach out into my bucket of programming concepts and rearrange a bunch of previous knowledge I had about computers into something more clear and concise. Thanks!
@alexhyettdev
@alexhyettdev 5 месяцев назад
You're welcome, glad I could help!
@sonederbr
@sonederbr Год назад
The best explanation/animation ever.
@alexhyettdev
@alexhyettdev Год назад
Thank you!
@cmaz6132
@cmaz6132 Год назад
Great tutorial, it really helped me! Keep it up👍
@alexhyettdev
@alexhyettdev Год назад
Thank you! I am glad you found it helpful.
@gantushigsaruul2489
@gantushigsaruul2489 4 месяца назад
Thank you for easy to understand and great video
@tannguyen_91
@tannguyen_91 3 месяца назад
amazing, this help me understand everything
@milehighgaragespeedshop1065
Excellent explainer and graphics THX
@alexhyettdev
@alexhyettdev Год назад
You’re welcome, I am glad you like it.
@MrHussien66
@MrHussien66 6 месяцев назад
you actually help me understand a lot ,thank you sir
@alexhyettdev
@alexhyettdev 5 месяцев назад
You’re welcome!
@scubagoblin
@scubagoblin 9 месяцев назад
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!
@alexhyettdev
@alexhyettdev 9 месяцев назад
You’re welcome! I am glad I could help you understand it. Hopefully more fun than reading 20 pages of that book.
@vfryhn2
@vfryhn2 Год назад
Such a great explanation
@alexhyettdev
@alexhyettdev Год назад
Thank you! I am glad you liked it.
@ragtop63
@ragtop63 4 месяца назад
Well done! Very good video.
@MarcoLenzo
@MarcoLenzo 9 месяцев назад
This video was very good! I really like the way you explain!
@alexhyettdev
@alexhyettdev 9 месяцев назад
Thank you! I am glad you liked it.
@johndzikunu9986
@johndzikunu9986 Год назад
This is good. Have learned some things I could not know in a year.
@alexhyettdev
@alexhyettdev Год назад
That’s great I am glad you learned something from it. Thank you for commenting.
@mehtubbhai9709
@mehtubbhai9709 4 месяца назад
@Alex Hyett As always, you give the best explanation of whatever programming topics that you cover. Please keep up the great work and keep the content coming. I'm a fan :)
@alexhyettdev
@alexhyettdev 2 месяца назад
Thank you, I am glad you like them!
@i_am_dumb1070
@i_am_dumb1070 Год назад
Thank you very much i was not able to understand this concept even after reading and watching a lot of videos now i have a good understanding of this
@alexhyettdev
@alexhyettdev Год назад
That’s great! I am glad I helped.
@i_am_dumb1070
@i_am_dumb1070 Год назад
@@alexhyettdev if possible can you please explain the anonymous function part i didn't get it
@Tanessok
@Tanessok 2 месяца назад
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.
@rafaelstrack5858
@rafaelstrack5858 4 месяца назад
Great video!
@GG-sw9vm
@GG-sw9vm 11 месяцев назад
that was a clean description of stack and heap. Never knew about anonymous function being a heap, but it makes sense
@alexhyettdev
@alexhyettdev 11 месяцев назад
Thanks I am glad you liked it 👍
@johnolawale2749
@johnolawale2749 3 месяца назад
Finally, i now understand the differences between these two. Thank you for the video
@alexhyettdev
@alexhyettdev 2 месяца назад
You're welcome 😊
@AXkj3mmy
@AXkj3mmy 4 месяца назад
Thank you! This was great
@JanosTech
@JanosTech 9 месяцев назад
Fantastic explanation, thanks mate!
@alexhyettdev
@alexhyettdev 9 месяцев назад
You’re welcome! I am glad you liked it.
@miladfahimi4787
@miladfahimi4787 3 месяца назад
that was flawless thanks a million man
@alexhyettdev
@alexhyettdev 2 месяца назад
You're welcome, I am glad you liked it.
@iDeveloper92
@iDeveloper92 10 месяцев назад
Excellent breakdown!
@alexhyettdev
@alexhyettdev 10 месяцев назад
Thank you!
@ukaszkiepas57
@ukaszkiepas57 4 месяца назад
Thank you very much mate. Clear : )
@Ali_Pxll
@Ali_Pxll 6 месяцев назад
Man you're a savior thanks for the clear explanation
@alexhyettdev
@alexhyettdev 6 месяцев назад
Thanks, glad I could help
@jacobL1172
@jacobL1172 9 месяцев назад
Learning Redux right now, so very helpful! Definitely subscribing.
@alexhyettdev
@alexhyettdev 9 месяцев назад
Awesome, thank you!
@juliaclaire68
@juliaclaire68 8 месяцев назад
thank you! very clear
@alexhyettdev
@alexhyettdev 8 месяцев назад
You're welcome Julia, thank you for commenting.
@rembautimes8808
@rembautimes8808 4 месяца назад
Loved the garbage collector animation. Very nice and funny
@0bsy96
@0bsy96 4 месяца назад
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 !!!
@nikolabosevski1435
@nikolabosevski1435 4 месяца назад
Samee heree, I've never even thought of why we couldn't call variables from different scopes, i just took it for granted this opened my eyes
@TheHermitProcess
@TheHermitProcess 3 месяца назад
I'd be extremely weary of taking this for fact. It is up to the compiler to generate scoping rules, as far as I know. Look into it a bit more.
@hsemix
@hsemix 8 месяцев назад
Nice video, very helpful
@alexhyettdev
@alexhyettdev 8 месяцев назад
You’re welcome, thanks for commenting.
@EugeneDaveAstator
@EugeneDaveAstator 6 месяцев назад
Awesome video! Id like to add that in csharp async doesnt always equal multithreading, and since it uses internal statemachine which is a class, asyncs may get allocated on the heap
@alexhyettdev
@alexhyettdev 6 месяцев назад
Yes it’s a good point!
@tibebetech4867
@tibebetech4867 Год назад
Thank you!
@alexhyettdev
@alexhyettdev Год назад
You're welcome, I am glad you liked my video.
@Fernando-du5uj
@Fernando-du5uj 3 месяца назад
You're great. Thanks
@alireza.m
@alireza.m Год назад
Thanks for the video
@alexhyettdev
@alexhyettdev Год назад
You’re welcome!
@DiogoSilva-xx8nz
@DiogoSilva-xx8nz 8 месяцев назад
neat explanation, ty
@alexhyettdev
@alexhyettdev 8 месяцев назад
Thank you. Thanks for commenting!
@Soupie62
@Soupie62 4 месяца назад
How does garbage collection handle memory fragmentation? Is there a heap defrag utility? Do you wipe the heap when a program ends? What is multiple programs / threads run concurrently? Now I need to check the rest of your videos for answers. Thank you for starting my journey.
@nargesdeypir4579
@nargesdeypir4579 9 месяцев назад
Hey man, awesome awesome tutorial
@alexhyettdev
@alexhyettdev 9 месяцев назад
Thank you!
@alejandropoirier6493
@alejandropoirier6493 7 месяцев назад
Amazing explanation, greetings from Chile
@alexhyettdev
@alexhyettdev 7 месяцев назад
Thank you! Hi 👋 from UK 🇬🇧
@shadon_official2510
@shadon_official2510 3 месяца назад
this video is gold! wow!
@alexhyettdev
@alexhyettdev 2 месяца назад
Thank you!
@ronz91
@ronz91 Год назад
Great video
@alexhyettdev
@alexhyettdev Год назад
Thank you!
@lachlankitchen528
@lachlankitchen528 7 месяцев назад
Brilliant video
@alexhyettdev
@alexhyettdev 7 месяцев назад
Thank you!
@thankzcomputer
@thankzcomputer Месяц назад
thanks dude
@PalasBrown
@PalasBrown Год назад
thanks for your video
@alexhyettdev
@alexhyettdev Год назад
You're welcome, I am glad you liked it!
@sunnypatel1045
@sunnypatel1045 8 месяцев назад
Nice video pal. I love to see a video about boxing and unboxing.
@alexhyettdev
@alexhyettdev 8 месяцев назад
Thanks! Sure I will add it to my list.
@AdrianTregoning
@AdrianTregoning 10 месяцев назад
Create more content, you'll be to a million subscribers within a few short years I have no doubt. Your content is pure gold, thank you for explaining this so clearly.
@alexhyettdev
@alexhyettdev 10 месяцев назад
Thank you 🤞🏻. Regular content will be back again in September. I have had some family commitments that has put a stopper to my videos this month.
@AdrianTregoning
@AdrianTregoning 10 месяцев назад
@@alexhyettdev fully understand. Good luck! I quit my full time job as a mechanical engineer to become a programmer/coder of sorts. Bit tough being a student at age 41 but for me I made the decision to ultimately spend more time with my family. Have a super day further.
@user-ej8tt6lr2k
@user-ej8tt6lr2k 2 месяца назад
Great Vid
@petarkolev6928
@petarkolev6928 Месяц назад
Such a precious channel!!! Instant sub from me 🍻🍻
@nobody-dy6ld
@nobody-dy6ld Год назад
thank you.
@alexhyettdev
@alexhyettdev Год назад
You’re welcome!
@ivandrofly
@ivandrofly 2 месяца назад
Nice explanation :)
@alexhyettdev
@alexhyettdev 2 месяца назад
Thanks 🙂
@tylersmith8245
@tylersmith8245 Год назад
Incredible. Even though I've been a professional developer for six years, I was having a crisis of confidence tonight because I've worked with languages where I never have to worry about this directly. I was asking myself, "Do I even know anything about computers if I don't know the difference between the stack and the heap?" Five minutes and twenty-seven seconds later, I feel like I have a solid understanding of the difference and I'd be capable of talking about this intelligently. Thank you 🙏
@alexhyettdev
@alexhyettdev Год назад
I have been a developer for 12 years and I went through exactly the same thought process before making this video. I am really glad it helped you.
@___gg421
@___gg421 Год назад
Same here just went through a training where some memory management stuff was covered and I felt like an imposter. This made it all make sense
@Misteribel
@Misteribel 4 месяца назад
3:01 small correction. A const is NOT allocated on the heap. In fact, it's embedded on the call site at compile time (in C#/F#/VB), the reference is removed (you can test this: create a const in another lib, reference and use it in your lib. Compile. Now update the const in the referenced lib and recompile, but do not recompile your lib. You'll see it did not change on the call site). What you probably want is readonly, which, in your example at 3:01, would then be allocated on the heap.
@kwaku_2023
@kwaku_2023 2 месяца назад
@4:23 what do you mean by the anonymous function is pushed on top of the stack and not have access to what previous level down? You mean even variables within main?
@yassinekharkhach4889
@yassinekharkhach4889 Год назад
you are the king
@alexhyettdev
@alexhyettdev Год назад
Thanks man 👑!
@hermanheinz33
@hermanheinz33 Год назад
Very good video
@alexhyettdev
@alexhyettdev Год назад
Thank you! I am glad you enjoyed it.
@leeeric6292
@leeeric6292 11 месяцев назад
Many thanks to your video, this RU-vid is valuable, so I read word by word carefully. And I find at 03:55, about the static variable, which is different from what you mentioned in your flvog (the link you provide in descriptions). In ur flvog, in para "where do static variable live", there you said static variables even if they are value types are not stored on the stack or the heap...need clarify? Thanks.
@alexhyettdev
@alexhyettdev 11 месяцев назад
Thanks for spotting the discrepancy! I need to update my blog to make things clearer. Basically it is an implementation detail. In C# static variables are part of the MethodTables on the "High Frequency Heap". Which is a special part of the Heap memory for static variables and internal data structures. In C and C++ they are stored on the Data Segment, which is a special part of the memory for storing static variables and internal data structures. :) Sound familiar? If you look up Data Segment and High Frequency Heap they are both in the same place in memory. By the looks of things they are just slightly different implementations of the same thing. There is an old article here that explains it in depth: web.archive.org/web/20140724084944/msdn.microsoft.com/en-us/magazine/cc163791.aspx Jon Skeet also has a good article on it as well: jonskeet.uk/csharp/memory.html
@leeeric6292
@leeeric6292 11 месяцев назад
@@alexhyettdev Thanks for your response and your RU-vid.
@xetz
@xetz 5 месяцев назад
very nice video
@aelesbao
@aelesbao 7 месяцев назад
This video needs to be promoted higher on RU-vid. Anyone who wants to learn Rust should start from here before diving into the borrow checker.
@alexhyettdev
@alexhyettdev 7 месяцев назад
Thank you. I am glad it is useful for people learning Rust as well. Some of the C# references might not be applicable but hopefully the rest is. I need to learn rust as well actually!
@wajdwael8775
@wajdwael8775 2 месяца назад
Can you recommend 2 or more books on memory and data structures?
@Black_Cats_
@Black_Cats_ 10 месяцев назад
Good video. One question: In the case of results from asynchronous methods, once the asynchronous function completes, who cleans up the result in the heap that was left over by the async function?
@alexhyettdev
@alexhyettdev 9 месяцев назад
Generally they will be cleaned up by the garbage collector in the same way other objects on the heap are.
@Black_Cats_
@Black_Cats_ 9 месяцев назад
@@alexhyettdev thanks for your response
@harrylyod3402
@harrylyod3402 8 месяцев назад
Noice explanation thanks mate
@alexhyettdev
@alexhyettdev 8 месяцев назад
Glad it helped
@Cruz0e
@Cruz0e 11 месяцев назад
"In a previous video" you talked about value type and reference type... can we get a link to that? I found a playlist but this is the first video in it.. there is no previous video
@alexhyettdev
@alexhyettdev 11 месяцев назад
It was very briefly here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-pKFcVs2HibA.html
@joshuafashe9437
@joshuafashe9437 7 месяцев назад
God bless you man.
@alexhyettdev
@alexhyettdev 7 месяцев назад
Thank you! 🤩
@Cruz0e
@Cruz0e 11 месяцев назад
what does "heap has higher overheads" mean...? higher cost? I assume (seeing that little 'watch' with pointer at high) that you mean for example it's slower, because it's more complicated for the "machine code" to add to the heap?
@alexhyettdev
@alexhyettdev 11 месяцев назад
Yes higher overheads as in performance. It is slower to add to the heap compared to the stack.
Далее
Stack vs Heap Memory in C++
19:31
Просмотров 552 тыс.
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Аварийный выход
00:38
Просмотров 808 тыс.
Pointers and dynamic memory - stack vs heap
17:26
Просмотров 1,4 млн
How Senior Programmers ACTUALLY Write Code
13:37
Просмотров 1,3 млн
Bitwise Operators and WHY we use them
8:41
Просмотров 61 тыс.
Harder Than It Seems? 5 Minute Timer in C++
20:10
Просмотров 133 тыс.
So You Think You Know Git - FOSDEM 2024
47:00
Просмотров 987 тыс.
WHY IS THE HEAP SO SLOW?
17:53
Просмотров 198 тыс.
What is a stack and how does it work? - 6502 part 5
24:25