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

  • Home
  • SEARCH
  • 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 996175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:50:13+00:00 2026-05-16T06:50:13+00:00

I had some very wrong sounding advice recently from a senior developer/coworker regarding the

  • 0

I had some very wrong sounding advice recently from a “senior” developer/coworker regarding the C# garbage collector such as…

  • “You need to use destructors
    everywhere in C# because the garbage
    collector cannot be relied upon.”

  • “The C# garbage collector cannot be
    thought of like the Java garbage
    collector”.

This sounds extremely fishy to me, as far as I know the differences between the C# and Java garbage collectors are as follows…

  • The C# is a Generational garbage
    collector, Java is concurrent mark
    sweep in 1.6 with G1 being the new
    default (generational) garbage
    collector featuring Java 7 and has
    been optional since ~1.6.21. As far
    as I know
  • C# as a language has the ability to
    manually dispose of objects that
    implement IDisposable. Java must
    always use garbage collection,
    although some frameworks like SWT
    require you manually call methods to
    release memory in the underlying
    native code.

I realize that Java and C# are just the languages and the garbage collectors are a component of the runtime, however for this case I am specifically speaking about the Sun/Oracle JVM and the Microsoft .NET Runtime.

Does anybody have feedback?

  • 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-16T06:50:14+00:00Added an answer on May 16, 2026 at 6:50 am

    The advice you’ve been given is, broadly speaking, a load of hooey.

    Both C# and Java have GCs that attempt to optimise the fast recovery of lots of small objects. They’re designed to solve the same problem, they do it in slightly different ways but as a user the technical differences in your approach to using them is minimal, even non-existent for the majority of users.

    IDisposable is nothing to do with the GC as such. It’s a standard way of naming methods that would otherwise be called close, destroy, dispose, etc., and often are called that in Java. There is a proposal for Java 7 to add something very similar to the using keyword that would call a similar close method.

    “Destructors” in C# refers to finalizers – this was done deliberately to confuse C++ programmers. 🙂 The CLR spec itself calls them finalizers, exactly as the JVM does.

    There are many ways in which Java and C#/CLR differ (user value types, properties, generics and the whole family of related features known as Linq), but the GC is one area where you can develop a substantial amount of software before you need to worry much about the difference between them.

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

Sidebar

Related Questions

Recently I had to do some very processing heavy stuff with data stored in
I have some questions about customers about NF mode for DB2. Google had very
I had some site templates designed for me recently. I got the final HTML
I've had some trouble forking of processes from a Perl CGI script when running
If I had some XML such as this loaded into an XDocument object: <Root>
I recently had some problems with my VS 2008, and was recommended to reinstall.
I recently stumbled over a problem caused by some very old code I wrote
I had some time this afternoon to run a head to head comparison between
If you had some social networking applications and you wanted your users to interact
I just had some basic php questions to further my understanding as I learn,

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.