Not understood 4:28 onward. I think It will not stop to dispose unmanaged resources.
@nabhoyar3 жыл бұрын
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 Жыл бұрын
Beautiful, well explained.. Thanks ಚೆನ್ನಾಗಿದೆ ವಿವರಣೆ... 👌
@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
@martapfahl94011 ай бұрын
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.
@Tmp61695 ай бұрын
Free Palestine
@martapfahl9405 ай бұрын
@@Tmp6169 Fuck Palestine.
@theoceandragongaming Жыл бұрын
Why are you calling safe handle in the managed code section?
@DoGGy1110 Жыл бұрын
Why u freeing umanaged where u should free managed?
@bishnupriyapradhan77683 жыл бұрын
I think you meant destructor and not destructure
@raghurambhagawatula70253 жыл бұрын
4:28 and 5:24 doesnt make sense!!
@VSH0774 жыл бұрын
Fantastic explanation. Thanks a lot.
@wowpravin2 жыл бұрын
Good one! But not sure why recommend not implementing Finalizer? You are assuming that the clients of your class will always call Dispose.
@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.
@manishjawarkar844 жыл бұрын
very nicely explained...thank you
@SupriyaMondal34 жыл бұрын
too fast, please give a pause between sentences.
@CodeRadiance4 жыл бұрын
Sure.
@vignesharunkumar60053 жыл бұрын
Nice explanation but very fast. Just give some gap