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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:36:47+00:00 2026-06-11T13:36:47+00:00

I read this in a Java Text book(SL-275) Programs that do not de-allocate memory

  • 0

I read this in a Java Text book(SL-275)

Programs that do not de-allocate memory can crash eventually when there is no memory left on the system to allocate. These programs are said to have memory leaks.

Why will there be no memory left? The systems usually have Hundreds Gigabytes of memory and the variable take 2-8 Bytes of data. Lets say we have 1000 undestroyed variables, thats just 8KB.
So why is Garbage collection that important?

I tried searching for the answer on the web and even approached my lecturers but could not find a satisfactory answer.

  • 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-11T13:36:48+00:00Added an answer on June 11, 2026 at 1:36 pm

    It is a memory leak if the memory cannot be reclaimed by the system once the program has finished using a variable.

    It is important, because,

    1. You might say 8 bytes is a little bit of data. But what if those 8 bytes are leaked in a tight loop running millions of times per minute ? You will have exhausted memory very quickly.
    2. Larger datastructures are very common. Example: A web scraper could leak representations of HTML documents, easily 100’s of kB or even megabytes.
    3. Though memory is cheap, 100’s of gigabytes of RAM is still uncommon. You might think about disk space, and disk space is slow. When you have exhausted your RAM and the system needs to swap memory between disk and RAM to do the simplest operations, performance will degrade in the extremes.
    4. Also consider mobile or embedded devices, that can have very limited memory.

    True war story: I once debugged an ASP .NET system that had a tiny memory leak (I think it was about 60 bytes per request to a particular webpage). But that page was hit a lot, and we had to recycle application pools each hour to avoid exhausting RAM on the server. This was on a very well specced server. It also shows that leaks can even occur in garbage collected environments – we should always be aware of memory consumption.

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

Sidebar

Related Questions

I know abstract fields do not exist in java. I also read this question
This is a very basic question on Java. I've read somewhere that at first
First, a big thank you to anyone that read this question and can help.
I've read hundreds of explanations on this in java and I'm really having trouble
I have read Java Concurrency in Practice and this is a great reference, but
I read this article : http://lwuit.blogspot.in/2008/06/lightweight-text-input-in-lwuit.html This article talks of autocomplete textfield embedded on
I want to read text file's comma separated variables in a java script array
I have a Java program that outputs some text into console. It uses print
I have this java script that I use to display a video on a
I have a wysiwyg text area in a Java webapp. Users can input text

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.