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 8104407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:49:51+00:00 2026-06-05T23:49:51+00:00

As of my knowledge i know like GC performs collection operation in order to

  • 0

As of my knowledge i know like GC performs collection operation in order to remove unmanaged resources to release memory which is called implicit clean up. And by using ‘USING’ keyword we can do it explicit cleaning but my doubt is how GC releases managed resources.

  • 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-06-05T23:49:53+00:00Added an answer on June 5, 2026 at 11:49 pm

    You don’t have to do anything special in order for GC to clean up your managed resources. GC will clean it up sometime after there are no references left to your managed resource.

    If your managed resource owns unmanaged resources, you can implement the IDisposable interface and call the Dispose method, in which you’d explicitly clean up your unmanaged resources. using statement makes it very easy to use this interface, as it automatically calls Dispose when the code exists the using block, even in case of exceptions.

    You might take a look at the MSDN documentation on Garbage Collection.

    EDIT: based on comments above.

    You could override Object.Finalize by defining a finalizer (e.g. ~MyClass()) but there is no telling when it will be called by GC. IDisposable is generally preferred. More info on Finalizer vs Dispose here.

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

Sidebar

Related Questions

I'd really like to know what knowledge do I have to pursue in order
I would like to know in which order I should learn different areas of
Edit: I'd still like to know the answer to this question for knowledge's sake.
I would like to know how is it possible, or what knowledge do I
I am a new programmer and i would like to know which is the
I would like to know how I could remove entire rows from an image,
I know XHTML CSS but PHP knowledge is not much and i want to
Please forgive my programming knowledge. I know this is a simple thing, but I
I would like to know the difference between KEEP and UNCATLG. As per my
I would like to know the past 7 days record. I want to write

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.