+ 3
Is it necessary to use destructor when you have garbage collector in dotnet?
5 ответов
+ 3
It is necessary ONLY if your class has objects like pointers, file handles, network connections etc which are "unmanaged resources" and therefore aren't managed by the .net garbage collector, therefore should be dealt with by using finalizers (like destructors), though in updated versions of .not you have other ways of dealing with them.
0
NO.
But you can use if it is required.
0
no garbage collector do it for u, but can call it manually if u want
0
No it is not mandatory but if you have pointers,unmapped resources you have to think about it...!
0
😊😊