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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:45:53+00:00 2026-06-14T09:45:53+00:00

I have recently taken over the responsibility for a code-base written using the .NET

  • 0

I have recently taken over the responsibility for a code-base written using the .NET compact framework for mobile devices and I see the code scattered with Dispose() calls all over the place.

This seems to be on

  • ADO.NET db commands
  • Windows Forms

I thought that the Garbage collector would handle memory management. I know they might hang in memory a little longer without Dispose(), but is there much advantage or gain to having these calls? It seems to pollute the neatness of the code.

  • 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-14T09:45:54+00:00Added an answer on June 14, 2026 at 9:45 am

    I know they might hang in memory a little longer without Dispose(), but is there much advantage or gain to having these calls? I

    It really depends a lot on what is being Disposed by these calls. IDisposable isn’t (necessarily) about releasing memory, but rather about releasing resources. In general, you always should call Dispose on objects when it’s possible to do so without huge hoops in your logic, and not rely upon the GC to cleanup resources unless necessary.

    Given that you’re running on CF, it’s likely even more critical. If your program is targeting a platform with limited resources, cleaning up those resources as soon as possible is very important.

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

Sidebar

Related Questions

We have taken over a .NET project recently and upon looking at the db
I've recently taken over development of a website written in asp.net. Before taking this
I have recently taken over an application that uses the Peter Blum Date and
I have recently taken over a development project that has a Git repository linked
I recently have taken the support and programming of a web system written in
I have a good sized hobby project, around 66K LOC, over at http://www.wheelmud.net Recently,
I have recently taken over a project in PHP/CakePHP . Now I wanted to
I have recently taken over a linux box running subversion. The folder where the
I have recently taken over a new website but when I get the source
I've recently started a new job where I have taken over developing an existing

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.