memory-leaks

Chrome HTML Page Memory Usage

元气小坏坏 提交于 2019-12-23 03:26:51
问题 I have a page which I loaded in Chrome with Timeline started, after 5th second, you can see three spikes. After 7th second page is loaded and stabilized. Looks like chrome has allocated memory but didnt garbage collect them. On nearly 11th second (with a black mark on Image 1), I press Garbage Collect on timeline and I see all memory released down to 3 MB. After memory comes down to 3MB, my page works correctly. My target is to find memory leaks (if there are any). But after garbage collect,

Where is my Java memory going?

寵の児 提交于 2019-12-23 03:20:14
问题 I am running a JUnit test suite from Ant or Eclipse. PermGen is limited to 200 MB, heap to 1000 MB. Java VisualVM reports allocated PermGen as 200 MB and allocated heap as 350 MB. That's 550 MB. However, total virtual set size of this process is 2.5 GB, and resident set size is 1.8 GB. I understand there is supposed to be some overhead, but if PermGen and heap are 0.5 GB and the process is using 1.8 GB, where is the missing 1.3 GB? How can I diagnose and fix it? 回答1: What is the heap free

iPhone - Objective-C Memory Leak with SBJsonParser

柔情痞子 提交于 2019-12-23 03:16:14
问题 I keep getting the following memory leak using the "Leaks" tool in Xcode. As this is a library, I'm just wondering what would be the best way to fix such a leak. Any help would be greatly appreciated. I am happy to share more code if needed. UPDATE: I found this article, which doesn't seem promising. Has anyone got any suggestions as to how to fix this? http://code.google.com/p/json-framework/issues/detail?id=13 This is how I'm using the library. - (void)getFacebookProfileFinished:

Handling Ctrl+C exception with GPU

北慕城南 提交于 2019-12-23 02:54:08
问题 I am working with some GPU programs (using CUDA 4.1 and C), and sometimes (rarely) I have to kill the program midway using Ctrl+C to handle some exception. Earlier I tried using CudaDeviceReset() function, but this reply by talonmies displaced my trust in CudaDeviceReset() and hence I started handling such exceptions the Old-Fashioned way, that is 'computer restart'. As the project size grows, this method is becoming a headache. I would appreciate if anyone has come up with a better solution.

How to prevent malfunction (memory leak) by disposing static methods?

点点圈 提交于 2019-12-23 02:45:16
问题 I am using ASP.NET 4.0. From last few weeks, few users are complaining that the application starts malfunctioning. The GridView suddenly starts showing contents of a DropDown control that the same user or another concurrent user might have accessed at any point of time in that day. Similarly, DropDown controls may get populated by RowID of the any old result-set instead of the actual items. I came across an article: Users seeing other users data in ASP.NET where the author discusses about

NSTimers causing leaks

混江龙づ霸主 提交于 2019-12-23 02:38:44
问题 I've read up a lot about NSTimers, but I must be doing something very wrong with them, because it's practically all the leaks that show up in the Leaks Instrument. The "Responsible Frame" column says -[NSCFTimer or +[NSTimer(NSTimer). So here's how I have an NSTimer set up in my main menu. I shortened it up to just show how the timer is setup. .h - @interface MainMenu : UIView { NSTimer *timer_porthole; } @end @interface MainMenu () -(void) onTimer_porthole:(NSTimer*)timer; @end .m - (in

How to fix memory leak in scipy.stats when generating random variates with rv_continuous?

北战南征 提交于 2019-12-23 02:36:28
问题 The following minimal example appears to suffer from memory leak (tested using SciPy verison 0.17.0) import resource from scipy.stats import rv_continuous class Rv(rv_continuous): def __init__(self, x): rv_continuous.__init__(self, a=0, b=1) self.x = x def _pdf(self, y): return 1 def call_rv(x): rv = Rv(x) # if the line below is commented out, memory usage stays constant s = rv.rvs() return 1 for k in range(10000): x = call_rv(k) if k%1000==0: mem = resource.getrusage(resource.RUSAGE_SELF).ru

Leaks using GKStateMachine in a Subclass

蓝咒 提交于 2019-12-23 01:50:07
问题 I will show you my actual code. It has three elements: a Helper: import SpriteKit import GameplayKit class GameSceneHelper: SKScene { override func didMove(to view: SKView) { } } A subclass of the helper with some game's states: import SpriteKit import GameplayKit class GameScene: GameSceneHelper { lazy var gameState:GKStateMachine = GKStateMachine(states: [ Introduction(scene: self), SecondState(scene: self) ]) override func didMove(to view: SKView) { self.gameState.enter(Introduction.self)

Leaks while adding to array in while loop

梦想与她 提交于 2019-12-23 01:43:36
问题 I have function named: - (void) AddSortedCustomFeed :(NSMutableArray*) rssList; this function adds items(Articles) from sqlite database to NSMutableArray here how this function works: - (void) AddSortedCustomFeed :(NSMutableArray*)rssList { NSLog(@"\n\n\n ----- Add Sorted SQL Database -----"); NSLog(@"Start"); // Create Query String. NSString* sqliteQuery = [NSString stringWithFormat:@"SELECT mainLink, title, summary, pubDate, author, imageLink, body, favorites, pubdatetime FROM ARTICLES

WeakReference and memory leaks

不想你离开。 提交于 2019-12-23 01:35:16
问题 I'm profiling my application using VisualVM and I see that the heap size increased by about 7MB in about 3 days. When I use memory sampler, I also see that java.lang.ref.WeakReference is in the top five for the instances number. The number of WeakReference is increasing and GC has almost no effect. Any idea? 回答1: You do not have a memory leak. Java's GC only runs when the heap is full (actually is a bit more complicated since the heap itself is divided into generations, but anyway), so unless