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
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
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.
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.
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
Beautiful, well explained..
Thanks
ಚೆನ್ನಾಗಿದೆ ವಿವರಣೆ... 👌
Not understood 4:28 onward. I think It will not stop to dispose unmanaged resources.
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
Fantastic explanation. Thanks a lot.
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.
Free Palestine
@@Tmp6169 Fuck Palestine.
Why are you calling safe handle in the managed code section?
Why u freeing umanaged where u should free managed?
I think you meant destructor and not destructure
4:28 and 5:24 doesnt make sense!!
very nicely explained...thank you
Good one! But not sure why recommend not implementing Finalizer? You are assuming that the clients of your class will always call Dispose.
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.
good explanation
Awesome
Nice explanation but very fast. Just give some gap
too fast, please give a pause between sentences.
Sure.
Please slow down your speed
not clearly understood and too fast explanation.
Not clear explanation