Why Dispose When there is GC
Reply
![]() |
|
|
From:
Anand Kumar
|
Hi,
Dispose used to cleanup the resources .If you see the definition of dispose it does nothing, so its the developer's responsibility to implement the dispose method.. In addition, you are strongly discouraged from calling a Finalize method.The Finalize method is costly to performance.If your Dispose method has already done the work to clean up the object, then it is not necessary for the garbage collector to call the object's Finalize method so your Dispose method should call the GC.SuppressFinalize method for the object it is disposing.Dispose helps GC to collect objects more effectively and quickly.
Cheers anand
|
|
View other groups in this category.
![]() |
To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.
Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.
If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.
|
|
- Re: Why Dispose When there is GC Anand Kumar
-