c# - How to use IDisposable to dispose an object -
I want to use the IDisposable interface to clean any resource from memory, which is not being used .
Disposal of Public Sector: IDisposable {Public Zero Extract () {New NotImplementedException Throwing; } Public Zero Fun () {Pizzahphtttti _ PG = New Pizza Factory (); //}}
I want to dispose of the pz
object, when there is no reference in it please tell me how to do it.
This is the garbage collector. If you are worried that you are worried about retrieving memory, then Garbage collectors do this for you. IDisposable
is reclaiming about unmanaged resources (network connections, file handles, etc.). If pizzafactor
has any of these, then this should apply to IDisposable
- and you should clearly manage your settlement (You can add a final form to run at some point after not having a more live reference about it, but it is not undefined.)
Comments
Post a Comment