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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:10:07+00:00 2026-05-18T11:10:07+00:00

I have written an app that interacts with ODBC and feeds messages into an

  • 0

I have written an app that interacts with ODBC and feeds messages into an GUI. For some reason as a campaign goes on Java’s memory usage grows to very large amounts over 1GB ram. The app is simple and should not be running up memory like that. I think that because the threads are so busy and not stifled in anyway Java isn’t getting the chance to release the memory it is allocating so it keeps getting bigger and bigger. What I would like to do is somewhere in the thread force Java to release the memory. Can anyone tell me how to do this?

  • 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-18T11:10:07+00:00Added an answer on May 18, 2026 at 11:10 am

    Java can only release memory for objects that are no longer referenced (i.e., in use) by the program. And, once an object is no longer referenced, it will be cleaned up fairly quickly (albeit in a way that’s out of your direct control).

    This is likely a straightforward memory leak. You’ll need to analyse the memory to see which objects are there that shouldn’t be, and then determine why the garbage collector thinks they are still reachable. At some point in your code you’ll be failing to release these variables that are no longer needed (for example, putting them in a Map, though there are many ways of leaking memory if you’re not careful).

    The first step is to analyse the heap to find out which objects are there that shouldn’t be. You can use jhat, jvisualvm, various profilers and likely other tools for this.


    The following questions may be of use in solving this issue:

    • How to find a Java memory leak
    • Common Java memory/reference leak patterns?
    • How to free up memory?
    • Best practice for handling memory leaks in large Java projects?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written an app that takes an uncompressed .wav file and encodes into
I have written a small android app that grabs some data and displays it
I have written an iPhone app that uses the iPhone's relative GPS location. I
I have written a C# app that runs constantly in a loop and several
I have written a small app that puts my bluetooth in discoverable mode for
I have written a BlackBerry app that RSA encrypts a message using PKCS1FormatterEngine. This
I have written a small chat app that uses mysql + php to facilitate
I have written an GWT app and a static Intro page that introduces the
I am learning flex and have written a little app with a TextArea that
I have a TCP server app that is written in C#. I accept TCP

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.