memory-leaks

Charting library that does not cause memory leak when updating chart

爷,独闯天下 提交于 2020-01-01 10:16:50
问题 I want to build a page with interactively refreshing charts based on the data that is being fetched from the server asynchronously using AJAX. I really like jqPlot, but when trying to update the graph periodically (by calling replot() , without page refresh), it causes a huge browser memory leak. It seems to be a well known issue occurring on all major browsers. I haven't tried Flot and protovis, but quick googling reveals that they seem to have the same problems. Are you aware of any

Understanding memory leaks in Android application

心不动则不痛 提交于 2020-01-01 09:44:55
问题 I found the article "Avoiding memory leaks", where it is said that the following code: private static Drawable sBackground; @Override protected void onCreate(Bundle state) { super.onCreate(state); TextView label = new TextView(this); label.setText("Leaks are bad"); if (sBackground == null) { sBackground = getDrawable(R.drawable.large_bitmap); } label.setBackgroundDrawable(sBackground); setContentView(label); } is not a good idea, since: When the screen orientation changes the system will, by

list “cold” memory areas

怎甘沉沦 提交于 2020-01-01 09:33:08
问题 I'm trying to hunt down a very evasive bug in a server software that look like a memory leak, but memcheck didn't help at all. My guess is that the memory that has been instantiated and never removed is indeed not leaked, so there is a reference to it, but is now useless for the program and should be removed. Is there a tool that can count accesses, not references, in memory, and so give a evaluation of the effective usage of objects in heap? 回答1: I ended up with implementing my own tool. My

Detect node.js/javascript memory leak in code

為{幸葍}努か 提交于 2020-01-01 09:28:33
问题 I have some code that is working, however it has a memory leak in it. What are some good strategies for tracking memory leaks in node.js? What steps should I follow when looking for such leaks? How can I track the leak in my code? Thanks 回答1: You can figure this out by profiling the memory usage of your application. Javascript objects are allocated on the heap, so you'll want a tool that can dump the heap. After acquiring a heap dump you can inspect it and see how many instance of a given

MapView v2 keeping Context around

◇◆丶佛笑我妖孽 提交于 2020-01-01 08:38:08
问题 When using the MapView from the latest google maps API, I am getting a memory leak because MapView is holding onto my activity. I used Leak Canary and have this trace D/LeakCanary﹕ * GC ROOT com.google.android.gms.location.internal.t.a D/LeakCanary﹕ * references com.google.android.gms.location.internal.s.a D/LeakCanary﹕ * references com.google.maps.api.android.lib6.d.v.c D/LeakCanary﹕ * references com.google.maps.api.android.lib6.d.aj.b D/LeakCanary﹕ * references com.google.maps.api.android

Getting leak in leak in [NSURLConnection sendSynchronousRequest:theRequest returningResponse:nil error:nil]

こ雲淡風輕ζ 提交于 2020-01-01 07:26:08
问题 I am having a leak in returnData= [NSURLConnection sendSynchronousRequest:theRequest returningResponse:nil error:nil]; The below is the code i am using NSString* curl = @"https://Some Url?ticket="; curl = [curl stringByAppendingString:self.ticket]; curl = [curl stringByAppendingString:@"&apikey=hjgajgfjaghjf&XMLString="]; curl = [curl stringByAppendingString:stringB]; curl = [curl stringByReplacingOccurrencesOfString:@"\n" withString:@""]; NSURL *finalURL = [NSURL URLWithString:curl];

Incomplete Type memory leaks?

此生再无相见时 提交于 2020-01-01 05:40:28
问题 Microsoft Visual Studio 2008 is giving me the following warning: warning C4150: deletion of pointer to incomplete type 'GLCM::Component'; no destructor called This is probably because I have defined Handles to forward declared types in several places, so now the Handle class is claiming it won't call the destructor on the given object. I have VLD running and I'm not seeing any leaks. Is this literally not calling the destructor for this object or is this a "may not call destructor for object"

How to create a memory leak in C# / .NET [duplicate]

[亡魂溺海] 提交于 2020-01-01 05:32:20
问题 This question already has answers here : Closed 8 years ago . Possible Duplicates: Is it possible to have a memory leak in managed code? (specifically C# 3.0) Memory Leak in C# There was a similar question on this yesterday, but for Java, so I'm interested - what it takes to create a memory leak in C# / .NET (without using unsafe) ? 回答1: static events; DEADLY, since they never go out of scope. static event EventHandler Evil; for(int i = 0 ; i < 1000000 ; i++) Evil += delegate {}; The

Confusing Tomcat Persistent Session Memory Profile

本小妞迷上赌 提交于 2020-01-01 05:27:08
问题 As with any memory management issue, this is a long story, so strap-in. We have an application that has been suffering from some memory management issues, so I've been trying to profile the app to get an idea of where the problem lies. I saw this thread earlier today: Tomcat Session Eviction to Avoid OutOfMemoryError ... which seems to follow suit with what I was seeing in the profiler. Basically, if I hit the app with a bunch of users with Jmeter it would hold onto the heap memory for a long

Cyclic adding/removing of DOM nodes causes memory leaks in JavaScript?

空扰寡人 提交于 2020-01-01 05:16:11
问题 I'm trying to display dynamically changeable data manipulating with DOM elements (adding/removing them). I found out a very strange behavior of almost all browsers: after I removed a DOM element and then add a new one the browser is not freeing the memory taken by the removed DOM item. See the code below to understand what I mean. After we run this page it'll eat step-by-step up to 150 MB of memory. Can anyone explain me this strange behavior? Or maybe I'm doing something wrong? <!DOCTYPE