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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:30:19+00:00 2026-05-28T03:30:19+00:00

Could you guys please help me find memory leak ? I’m from C++ world

  • 0

Could you guys please help me find memory leak ? I’m from C++ world and memory leaks in Java are kinda strange thing to me since according to my code I keep no references to temporary object.

I’m using GAE SDK 1.6.1 and Objectify 3.1.

I have following method which is being executed in backend instance of GAE dev server (which is probably irrelevant info to the issue).

private void loadProtoBufdata() throws Exception
{
    ObjectifyDAO dao = new ObjectifyDAO();

    for (long count = 0; count < 100; ++count)
    {
        Visitor visitor = new Visitor();
        visitor.setKey(count + 1);
        dao.ofy().put(visitor);
    }

    dao = null;
}

In constructor of ObjectifyDAO it’s being initialized as

public ObjectifyDAO()
{
    super(new ObjectifyOpts().setSessionCache(false).setGlobalCache(false));
}

And Visitor is as simple as

public class Visitor
{
    @Id
    Long key;
    Long ek;
    @Unindexed String ip;
    Date t;
    @Unindexed Long lzVisit;
}

I’m using JProfiler 7.0.1 to catch memory leaks. After running this code I have few megabytes of com.google.storage.onestore.v3.OnestoreEntity$PropertyValue and com.google.storage.onestore.v3.OnestoreEntity$Property.

I don’t want to blow up this post so I uploaded screenshots from JProfiler.

Reference tree is here. Allocation tree is here.

I found this bug on Objectify’s tracker and also this thread on Google Ground for GAE. So I’m not sure whose bug this is.

Questions are:

1) How to avoid memory leak?
2) Does it happen in production?

Thanks!!!

PS. Nick, I know you are reading this. Please help 🙂

  • 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-28T03:30:20+00:00Added an answer on May 28, 2026 at 3:30 am

    Check out http://www.eclipse.org/mat/ which is great for analysing memory leaks

    See http://wiki.eclipse.org/index.php/MemoryAnalyzer#Getting_a_Heap_Dump

    If there is a memory leak, something is hanging on to references. A tool like MAT will help you see what is hanging on to those object.

    Also, you may want to try your test on production. You can check the memory use on the appspot.com instances view. Production appengine can sometimes behave quite differently.

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

Sidebar

Related Questions

Could guys please help me find what causes memory leak ? It drives me
Hi Guys could you please help me refactor this so that it is sensibly
Could you guys give me an example how to read and write from/to xml
Hi guys wonder if you guys could help me I'm trying to compile a
Hey guys I was wondering if someone could provide a little help. I've been
Please could someone help me, i will be forever appreciative. I'm trying to create
I wonder if you guys could help me. I have a table called modules
I'm new in the world of jQuery. I have below requirements, Could you guys
Could you guys recommend me a good db modeling tool? Mainly for SQL Server...
Ok I give up and would really appreciate it if you guys could cast

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.