Your videos are Gold. And C# is maybe de most flexible and powerful language I've ever used. A while ago, I tried Golang, another powerfull language, but C# has a powerfull tool that Golang doesn't, JIT compiler. It makes C# powerful, because you can use it without recompilation on multiple systems, but if needed, C# also supports AOT (instead of JIT), and could be as fast as Go, ando even faster. A lot of caracteristics of C# makes it language beautiful (and my favourite), GC, Reflection, Expression Trees, AOT, JIT, Code Generators, full (or almost full) functional support (I still waiting for Union Types), App Domain, unsafe, pointers, etc.. I really love C# and its ecosystem (.NET and its VBasic and F# compatibility). Keep going, your videos are great!
Thank you, Shawn, for years you are in my opinion one of the top best teachers on Pluralsight. God bless you and your loved ones and thank you for sharing knowledge
Awesome video, I think I will add a couple questions to our interview process after this :) I agree with the statement that even seniors soemtimes say things like "you need to add IDisposable for garbage collector to clean up the object"
thanks for the video.. i totally agree on that, even some of the senior devs of the company i was working with didnt know the exact reasons or only the half of it which what seperates gc and idisposable etc. MSDN docs also have a very good explanation for this, which i recommend any c# dev to read.
Super helpful and cleared up for me how finalizers fit with IDisposable. Thank you! Very minor request: consider using larger text to help us old guys watching on our phones.
Typically, they are destroyed when the object is (once all the other objects that have wired up the events) are collected, but to be sure, you can do -= to remove the event handler on cleanup. This isn't what you should use IDispoable for. Typically, event driven have events like OnClose where you'd want to do it.
The GC is decidedly lazy when it comes to cleaning up objects. It's more efficient (less work) to recompact memory for the newest gen 0 and even gen 1 objects. Structs are underutilized, IMHO. I had not heard of record struct - thank you!
Your videos are Gold. And C# is maybe de most flexible and powerful language I've ever used.
A while ago, I tried Golang, another powerfull language, but C# has a powerfull tool that Golang doesn't, JIT compiler. It makes C# powerful, because you can use it without recompilation on multiple systems, but if needed, C# also supports AOT (instead of JIT), and could be as fast as Go, ando even faster.
A lot of caracteristics of C# makes it language beautiful (and my favourite), GC, Reflection, Expression Trees, AOT, JIT, Code Generators, full (or almost full) functional support (I still waiting for Union Types), App Domain, unsafe, pointers, etc.. I really love C# and its ecosystem (.NET and its VBasic and F# compatibility).
Keep going, your videos are great!
Sorry, I'm just learning English
Glad you like the content! C# is a language that's hard not to love.
Thank you man you saved my mind. In my company everyone call Dispose for everything and I am the crazy.
Oh heavens me ... this was a master-effing-piece. Thanks for the clarity it brought.
That blew my mind!!!!
Thankyou!
Wth... you just corrected a really confident yet wrong thought I had. instantly subscribing.
What a pleasant thing to wake up to. Great vid Shawn.
When I saw those glasses put on immediately subscribed. Great value content!
You subscribed because I can't see?
@@swildermuth yes
Thank you, Shawn, for years you are in my opinion one of the top best teachers on Pluralsight. God bless you and your loved ones and thank you for sharing knowledge
That's very kind of you to say, thank you!
Awesome video, I think I will add a couple questions to our interview process after this :) I agree with the statement that even seniors soemtimes say things like "you need to add IDisposable for garbage collector to clean up the object"
Glad to help!
thanks for the video.. i totally agree on that, even some of the senior devs of the company i was working with didnt know the exact reasons or only the half of it which what seperates gc and idisposable etc. MSDN docs also have a very good explanation for this, which i recommend any c# dev to read.
Thanks for sharing!
Thank you Shawn. Great explanation of this mechanism. Really cool that you showed it with diagnostics counters.
Glad it was helpful!
Super helpful and cleared up for me how finalizers fit with IDisposable. Thank you!
Very minor request: consider using larger text to help us old guys watching on our phones.
I try to remember, sorry about that, though the perf counters are hard to scale up
No worries! And I figured that was the reason you didn’t scale up. I could see the code well enough.
Boy it sucks getting old! Thanks again.
Great Video!
excellent and clear explanation as always!
Thanks!
Fantastic video and very pertinent to an app I'm building at work!
Glad to hear it's helpful!
Thanks a lot Shawn
I hope you create a video about when to use class, record, struct, class struct and record struct
Did this one help? th-cam.com/video/pAaHYrrRQBA/w-d-xo.html
@@swildermuth thanks
Thank you, excellent.
If we have events (the += type), where should they be cleaned up, and is that needed?
Typically, they are destroyed when the object is (once all the other objects that have wired up the events) are collected, but to be sure, you can do -= to remove the event handler on cleanup. This isn't what you should use IDispoable for. Typically, event driven have events like OnClose where you'd want to do it.
Sometimes I wonder how each iteration of WPF's TreeView handles it's memory...
Anyway, great video Shawn 👍
Glad you enjoyed it!
The GC is decidedly lazy when it comes to cleaning up objects. It's more efficient (less work) to recompact memory for the newest gen 0 and even gen 1 objects.
Structs are underutilized, IMHO.
I had not heard of record struct - thank you!
Depends on which GC you're talking about. The desktop GC vs. Server GC. One is more aggresive.