Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6115481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:05:46+00:00 2026-05-23T15:05:46+00:00

So does implementing Dispose() on the managed objects where would improve Garbage Collector’s performance

  • 0

So does implementing Dispose() on the managed objects where would improve Garbage Collector’s performance by getting a hint from the to probably bypass some of its whole process.

I saw this answer on a question which didn’t get high vote but is this true? If yes then how?

No that is wrong. I agree with Aaronaught.
In addition, Microsoft recommends, in a mid 2003 webcast that Don Box presented, that every .Net developer should dispose of their own objects, whether managed or unmanaged, as this improves code performance by anything upto 20%. If done right it can be a substantial performance improvement. So its a core skill that every .net developer needs to know and use.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:05:47+00:00Added an answer on May 23, 2026 at 3:05 pm

    First off, by calling Dispose methods, it in no way hints the GC that anything special should be done. Dispose is a normal method, like any other.

    The magic sauce is what Dispose does, namely releasing resources that are no longer needed.

    The #1 rule with IDisposable objects is to call Dispose when you’re finished with them. Yes the GC may eventually clean out memory, but if the objects are still linked to any others that are still in use, they will remain. Dispose also cleans up unmanaged resources, which is crucial, such DB connections, file handles, locks, etc. These definitely need to be closed ASAP.

    In short, if you instantiated an IDisposable object, Dispose of it when done.

    Yes it has a cost to call Dispose, but as I stated earlier, it means objects can be unlinked from each other, allowing the GC to free them next time it runs. It also means unmanaged resources can be freed immediately. Another win. Memory and resource leaks can cost performance badly, as can application crashes if it gets too extreme!

    The developer may have been protecting important resources, so please don’t try to second-guess him!

    Profiling is your friend here. If performance of re-creating these objects is a concern, cache them, but still be prepared to dispose of them when finished.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does implementing a ICallbackEventHandler gain any performance with respect to ViewState over an UpdatePanel
Does someone know a wrapper which would allow SQLite to load its data from
One of the rules for implementing the Dispose method says: Throw an ObjectDisposedException from
Does implementing the Java Security Manager result in decreased performance?
I have this question: Does implementing a custom MembershipProvider class needs you to implement
Does anyone have experience with implementing OpenID on a non technical website? If you
Does anyone know a good solution for implementing a function similar to Ruby's timeout
Does anyone have a simple example of implementing an async validation rule in csla?
Does anyone know of an ASP.NET guide to implementing OpenID and what information can
Does anyone know of any best practices or 'standard' techniques for implementing authentication between

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.