Finalize vs Dispose | C# Interview Questions

  Рет қаралды 43,485

Code Radiance

Code Radiance

Күн бұрын

Пікірлер: 23
@kadamrahulk
@kadamrahulk 4 жыл бұрын
Not understood 4:28 onward. I think It will not stop to dispose unmanaged resources.
@nabhoyar
@nabhoyar 3 жыл бұрын
Its best explanation. Just as how everyone suggested, you can slow down your speed as your contents are more when you are explaining. In between you can resummarize your points as well for better understanding. Other than that, it is the best explanation for GC. Keep it up
@anushinfobase3159
@anushinfobase3159 Жыл бұрын
Beautiful, well explained.. Thanks ಚೆನ್ನಾಗಿದೆ ವಿವರಣೆ... 👌
@stoic2454
@stoic2454 Жыл бұрын
Let’s say my implementation uses dispose pattern, i wrap my object inside a using block there dispose will be called and unmanaged resource will be released, but what about managed resources for instance we maybe having a list or some variables like that, do we need to free their memory as well ? given the fact that we suppress finalise when we explicitly call dispose
@martapfahl940
@martapfahl940 11 ай бұрын
So is it somewhat comparable to e.g. removing event handlers in React in the useEffect cleanup function? I am javascript dev curious about C# programming. Thank you.
@Tmp6169
@Tmp6169 5 ай бұрын
Free Palestine
@martapfahl940
@martapfahl940 5 ай бұрын
@@Tmp6169 Fuck Palestine.
@theoceandragongaming
@theoceandragongaming Жыл бұрын
Why are you calling safe handle in the managed code section?
@DoGGy1110
@DoGGy1110 Жыл бұрын
Why u freeing umanaged where u should free managed?
@bishnupriyapradhan7768
@bishnupriyapradhan7768 3 жыл бұрын
I think you meant destructor and not destructure
@raghurambhagawatula7025
@raghurambhagawatula7025 3 жыл бұрын
4:28 and 5:24 doesnt make sense!!
@VSH077
@VSH077 4 жыл бұрын
Fantastic explanation. Thanks a lot.
@wowpravin
@wowpravin 2 жыл бұрын
Good one! But not sure why recommend not implementing Finalizer? You are assuming that the clients of your class will always call Dispose.
@AvgDan
@AvgDan Жыл бұрын
When you add " : IDisposable" to a new class and select the potential fix for "Implement Interface with Dispose pattern", the boilerplate code will include this: "TODO: override finalizer only if 'Dispose(bool disposing)' has code to free unmanaged resources". Maybe the presenter is just regurgitating what MS says in the boilerplate code, I don't know. However, I did notice that not including the finalizer on a very small test class allowed me to create new instances of it ~3x faster. I think it's fair to expect programmers to dispose of objects that implement IDisposable. Perhaps a future version of Visual Studio will provide an informational underline under variable names which are instantiated as a type which implements IDisposable and they didn't do the instantiation in a using statement nor call Dispose.
@manishjawarkar84
@manishjawarkar84 4 жыл бұрын
very nicely explained...thank you
@SupriyaMondal3
@SupriyaMondal3 4 жыл бұрын
too fast, please give a pause between sentences.
@CodeRadiance
@CodeRadiance 4 жыл бұрын
Sure.
@vignesharunkumar6005
@vignesharunkumar6005 3 жыл бұрын
Nice explanation but very fast. Just give some gap
@merajkhan5078
@merajkhan5078 Жыл бұрын
Please slow down your speed
@chennaiahp5765
@chennaiahp5765 4 жыл бұрын
good explanation
@AjaySingh-fq4fz
@AjaySingh-fq4fz 4 жыл бұрын
Awesome
@PyramidSpiritualSeekers
@PyramidSpiritualSeekers 2 жыл бұрын
not clearly understood and too fast explanation.
@wd669
@wd669 Жыл бұрын
Not clear explanation
IDisposable and Finalizers
23:00
C# Academy
Рет қаралды 22 М.
The weirdest way to loop in C# is also the fastest
12:55
Nick Chapsas
Рет қаралды 255 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
C# Finalize vs Dispose Method | 2020
5:59
Vikas Kerni's Software Architecture Channel
Рет қаралды 5 М.
c# (Csharp) and .NET :- Difference between IEnumerable and IEnumerator.
13:39
.NET Interview Preparation videos
Рет қаралды 497 М.
How IDisposable and Using Statements Work Together in C#
10:01
IAmTimCorey
Рет қаралды 33 М.
What is TPL ( Task Parallel Library) and how it differs from threads (c# interview questions) ?
13:29
Garbage Collection [An Introduction in .NET 5.0]
17:29
DotNet Core Central
Рет қаралды 16 М.
.NET Core Garbage Collection
14:54
Coding Tutorials
Рет қаралды 25 М.
Using IDisposable in C#
4:48
Everything C#
Рет қаралды 3,1 М.
НЕ ДАМ ЕЁ В ОБИДУ😡 #shorts
0:24
Паша Осадчий
Рет қаралды 1,6 МЛН
DID YOU NOTICE ANY LAPSES IN THE VIDEO or NOT? / MARGO_FLURY
0:34
MARGO FLURY | Маргарита Дьяченкова
Рет қаралды 12 МЛН
Это лютый угар 🤣 | приколы Арсен Симонян
0:14
Арсен Симонян
Рет қаралды 294 М.
Таким раствором работать одно удовольствие
1:00
Профессия созидатели
Рет қаралды 954 М.
ЛАЙФХАК НА КУХНЕ ! 🧐🤦🏻‍♂️ #shorts #лайфхак
0:15
Крус Костилио
Рет қаралды 109 М.