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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:59:52+00:00 2026-05-30T08:59:52+00:00

My question is different from this I’ve done profiling of my application it is

  • 0

My question is different from this I’ve done profiling of my application it is too slow.
After completion of one process I have seen some live objects in the heap walker.

Though we are caching some data from database to HashMap but the heap walker shows me some live objects like Resultset.getString and Statement.getString which should not be there.

HashMap.put() taking very less memory then above two methods.

Have I done everything fine and is this analysis right? OR I am missing anything and the memory is occupied by HashMap itself and HeapWalker is just showing me methods of JDBC (getString and executeQuery).

  • 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-30T08:59:53+00:00Added an answer on May 30, 2026 at 8:59 am

    Since you’re talking about methods, I guess you’re looking at the “Allocations” view of the heap walker. That view shows where objects have been created, not where objects are referenced. There’s a screen cast that explains allocation recording in JProfiler.

    HashMap.put will not allocate a lot of memory, it just creates small “Entry” objects that are are used to store key-value pairs. The objects that take a lot of memory are created before you put them into the hash map.

    Resultset.getString and Statement.getString create the String objects that you read from your database. So it’s reasonable to assume that some of these objects are longer-lived.

    To find out why objects are still on the heap, you should go to the reference view, select incoming references and search for the “path to GC root”. The “biggest objects” view is also very helpful in tracking down excessive memory usage.

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

Sidebar

Related Questions

This is a different question from the one I just asked and it is
This is similar to (but different from) this question . Here is some simple
[Please note that this is a different question from the already answered How to
(Similar in spirit to but different in practice from this question .) Is there
This question is probably quite different from what you are used to reading here
This question is different from the others because all of the questions I've seen
This question is a little different from the others I've found here. My In
This question shows that cygwin’s soft links are somewhat different from ntfs junctions. I’d
Yet another IE is doing something different from other browsers question but this is
This is a new iPhone project, only 1 target (different from this question )

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.