finding the hidden reference causing a memory leak

Here's a pretty problem. I recently had a memory leak in a java program where one huge object was not collected, even though it "should" have been collected when the whole complex graph of objects that contained it became garbage. (Concretely, the large object is an image, and the complex graph is a window and all the associated structures).

So, barring the unexpected (gc bug) there is some pointer somewhere leaking into the graph containing the image, preventing the whole mess from being collected.

How to find it?


Category: java Time: 2016-07-28 Views: 0

Related post

  • Will passing SPWeb as by value parameter cause a memory leak? 2011-12-23

    I have an issue in my SharePoint environment and I suspect that this code causes a memory leak. I'm passing a SPWeb object as a value parameter. Will the SPWeb object instance get disposed correctly using this code? public void DoSomething(SPWeb web)

  • Can continually assigning a variable in a shell script cause a memory leak? 2014-04-04

    I've written a short script to copy Apache's server status to a log: #Save date and time to a variable dt=$(date) #Echo date and time to the log file as it's not included in server-status echo "Time :" $dt >> /var/logs/server-status.log #G

  • How to find the process which causes the arp request? 2011-05-05

    When i run tcpdump in the gateway, i get a lot of arp requests originating from the gateway itself. I wonder know why this happens. How can i find the process that causes these arp requests? $ tcpdump -n arp tcpdump: verbose output suppressed, use -v

  • Is there a way to see which of the services running in a process that is causing a memory leak in Windows 7? 2016-02-22

    I have a memory leak in the process svchost.exe on a Windows 7 machine. There are several of those process running with the same name of course. When I look at the services running there are 6: Com+ Event System Windows Font Cache Network list Networ

  • Is the way I remove objects causing a memory leak? 2012-02-26

    The game I'm working on consumes memory, and the memory used in megabytes increases around 2MB every 4 seconds. It starts at 5MB and grows to hundreds of megabytes in minutes. I was careful, and have little to no new variable declarations in the main

  • Can MD5ing all the files in a table cause a memory leak? 2013-09-09

    I'm running this code with the FastMD5 library. Could it lead to memory leaks, or does it seem OK? File[] directory = new File("/PATH/TO/FOLDER/WITH/LOTS/OF/FILES").listFiles(); for(int i = 0; i < directory.length;i++){ System.out.println(MD5

  • Android & OutOfMemoryError: Possible causes besides memory leak? 2015-07-01

    In my application I keep receiving crash reports where the root cause is an OutOfMemoryError. The app is quite image heavy (I use Picasso for all the image loading) and also has a WebView component that is used to display all kinds of content from te

  • Can not clearing a local java.util.Vector cause a memory leak? 2012-08-23

    In the code below, does not clearing or setting the local variable completed to null create the potential for a memory leak? private Vector<Element> elements; private void update() { Vector<Element> completed = new Vector<Element>(); for

  • UITableView 'hidden' section causing more memory allocations every time on pull to refresh 2014-02-21

    I'd like to see how to improve this code. I have a UITableView that I'm 'hiding' a section when the user taps on that section's header. I thought this was a pretty cool implementation I came up with, but it turns out when this section is hidden and t

  • 's' term in WP_Query extended class causes huge memory leak (268MB) 2015-05-21

    I've used WP-Geo-Posts as a starting point for building a plugin which extends WooCommerce to support classifieds-like functionality. Using ACF I've associated products with a location (latitude and longitude) and I'm now building location support in

  • pthread causes mysql memory leaks 2016-02-09

    I working on a multithreaded software that uses mysql to query database, I keep getting memory leaks after debugging and I have no clue what's causing them. I followed mysql dev guidelines and also this SO answer but the leaks are still there, I was

  • Does this I/O operation caused a memory leak 2011-08-25

    My colleague did some code Optimise work. Code below is from a public method of a public class (NOT STATIC CLASS OR METHOD) code before: Bitmap btMap = new Bitmap(Convert.ToInt32(WebConfig.StatsOpenEmailImageWidth), Convert.ToInt32(WebConfig.StatsOpe

  • applicationDidBecomeActive: Am I causing a memory leak? 2013-11-14

    Using ARC, I'm calling the following function in an iOS app every time the app gets opened in the applicationDidBecomeActive function. My concern is that it could create a memory leak because it's creating new instances of UIViewControllers every tim

  • find the application that consuming large memory 2015-01-30

    How to find which application is consuming large memory? Is there any other way than using top? --------------Solutions------------- you can pipe the output of ps and sort the column of memory depending on the requirement. ps aux | sort -r -k4 It wou

  • What is causing a Memory leak with opencv java submat 2016-01-20

    currSubMat = hsv.submat(ROI); I'm getting a memory leak when I use submat(ROI) java method, if I print the native address I have a memory leak. Any idea's?

  • What is causing this memory leak in iOS 2016-02-12

    I realize this question has been asked before, but I'm not sure how it applies in my scenario. Using instruments, I have discovered a memory leak, but I'm not sure how to go about correcting the leak. The leak occurs on the OSStatus status line. // S

  • Why eclipse can not find the hidden .project file until I press Ctrl-H on folder? 2012-01-10

    I am using eclipse on Ubuntu 11.10 When I try to open an project in eclipse IDE, it complains that the .project file can not be found. Now if I open the project folder in Ubuntu file browser and press Ctrl-H the hidden .project file is shown. After t

  • Shortcut method to find the front side bus and memory bus speed of your computer 2013-09-25

    I would like to check my RAM configuration. I know it is easy to check the total RAM installed on a computer (eg 32 GB), but is there an easy way to check in Windows if the RAM is e.g. 2x16 GB, 4x8 GB, 8x4 GB or 16x2 GB? Thank you --------------Solut

  • Find the remote userid causing updates on my table 2015-01-13

    Small question here. I found some answer close to it but not exactly what I'm looking for. Here is the situation: I have a SQL Server trigger on a table. Its task is to record the username (logon id) of the user who make some insert/update/delete. So

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 3.404 (s). 13 q(s)