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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:39:50+00:00 2026-06-09T10:39:50+00:00

I am new to GC and wondering what does garbage collector collect besides reference

  • 0

I am new to GC and wondering what does garbage collector collect besides reference that are no longer being referencing by any variables ? The following is the list that I want to check

  • Do primitive types (int, double, float, char….) get GC-ed ?
  • Do static variables get GC-ed ?
  • Do final variables get GC-ed (I think since it’s marked as immutable, so there’s nothing to collect) ?
  • Do all the methods (both static and non-static) get GC-ed ?
  • Do threads get GC-ed ?
  • 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-09T10:39:51+00:00Added an answer on June 9, 2026 at 10:39 am

    GC doesn’t collect any references, it just frees the objects (memory on heap) which are no more reachable.

    Static is special memory location and associated with class/classloader. If class/classloader un-deployed then static content will be removed from memory.

    Primitive types if associated with object (class variables), then they will be GCed when object is not reachable.

    If local variables/param variables, they will be on stack, so as soon as method execution completed, they are reclaimed.

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

Sidebar

Related Questions

I was wondering, how often does DHTMLX offer a new version and how hard
I am wondering what does Bounds do? like you can do label1.Bounds = new
I am extremely new to the web-development scene, but I was wondering: Does anybody
I am new to Team Foundation Server, so i was wondering what does Shelve
Im new to cakePHP, and Im wondering how a 'live' site does this. I
I am new to php and I am wondering how to catch errors that
I am quite new to .NET development and I am just wondering how does
I'm basically wondering if Python has any OOP shortcomings like PHP does. PHP has
I'm new to CSS and was wondering if there was any way to stop
hi people i am new at php and wondering what does int(4) mean in

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.