memory-leaks

ARM/Linux memory leak: Can a user program retain memory after terminating?

南笙酒味 提交于 2019-12-25 14:47:12
问题 I've got a memory leak somewhere , but it doesn't appear to be related to my program. I'm making this bold statement based on the fact that once my program terminates, either by seg-faulting, exitting, or aborting, the memory isn't recovered. If my program were the culprit, I would assume the MMU would recover everything, but this doesn't appear to be the case. My question is: On a small Linux system (64 Mb Ram) running a program that uses only stack memory and a few calls to malloc() , what

Strange memory usage pattern in C# Windows Form app

折月煮酒 提交于 2019-12-25 14:39:30
问题 I am trying to understand what is going on in app written in C#. Below are several images taken from Performance Monitor. The blue line is #Bytes in all Heaps. The green line is Large Object Heap Size. I start the app and log me in. The app remains idle. The first image shows that LOH increases for some reason and then drops. A pattern is very clear. What is responsible for such behavior? More. I do some heavy processing starting in A (see image below) using an Oracle Database through ODP.NET

Suggestions for Finding a Memory Leak in an Express Application?

和自甴很熟 提交于 2019-12-25 14:12:13
问题 I have an app built in Express 3.20. I keep it up and running with PM2. Watching the memory usage in PM2, I see it only takes a couple of hours for the usage to become >500MB for each process, at which point it starts having problems. About 90% of the requests received by my app are for thumbnail images. So I am guessing that the memory leak is coming from the portion of my code that serves thumbnail images to the user. The way the code works, a user requests an image of a certain size. The

Suggestions for Finding a Memory Leak in an Express Application?

本小妞迷上赌 提交于 2019-12-25 14:12:02
问题 I have an app built in Express 3.20. I keep it up and running with PM2. Watching the memory usage in PM2, I see it only takes a couple of hours for the usage to become >500MB for each process, at which point it starts having problems. About 90% of the requests received by my app are for thumbnail images. So I am guessing that the memory leak is coming from the portion of my code that serves thumbnail images to the user. The way the code works, a user requests an image of a certain size. The

Leaking NSAutoreleasePool

徘徊边缘 提交于 2019-12-25 12:11:32
问题 I'm working on an app and have 1 leak left. The leaked object is NSAutoreleasePool, size is 32 bytes. In the stacktrace only foundation methods are called. I have no clue how to resolve this. In simulator no leaks reported, on the device only this leak. Any idea's? The autoreleasepool is one I define myself. In my viewcontroller I call: [self performSelectorInBackground:@selector(getDetailInfo:) withObject:self.infoID]; This is getDetailInfo: - (void)getDetailInfo:(NSString *)theID {

Leaking NSAutoreleasePool

好久不见. 提交于 2019-12-25 12:10:04
问题 I'm working on an app and have 1 leak left. The leaked object is NSAutoreleasePool, size is 32 bytes. In the stacktrace only foundation methods are called. I have no clue how to resolve this. In simulator no leaks reported, on the device only this leak. Any idea's? The autoreleasepool is one I define myself. In my viewcontroller I call: [self performSelectorInBackground:@selector(getDetailInfo:) withObject:self.infoID]; This is getDetailInfo: - (void)getDetailInfo:(NSString *)theID {

Static context saved in Application class and used in a singleton toast builder, does this create a memory leak?

一世执手 提交于 2019-12-25 09:26:19
问题 I've got a singleton Toast-showing class, which keeps track of the current toast and cancels it when it is started again: public enum SingleToast { INSTANCE; private Toast currentToast; private String currentMessage; public void show(String message, int duration) { if (message.equals(currentMessage)) { currentToast.cancel(); } currentToast = Toast.makeText(App.getContext(), message, duration); currentToast.show(); currentMessage = message; } } (Extended explanation of this example can be

Static context saved in Application class and used in a singleton toast builder, does this create a memory leak?

回眸只為那壹抹淺笑 提交于 2019-12-25 09:21:12
问题 I've got a singleton Toast-showing class, which keeps track of the current toast and cancels it when it is started again: public enum SingleToast { INSTANCE; private Toast currentToast; private String currentMessage; public void show(String message, int duration) { if (message.equals(currentMessage)) { currentToast.cancel(); } currentToast = Toast.makeText(App.getContext(), message, duration); currentToast.show(); currentMessage = message; } } (Extended explanation of this example can be

Memory leak in C++ Threads, Used VALGRIND to debug

跟風遠走 提交于 2019-12-25 09:16:55
问题 I have a thread system that keeps allways opened a certain amount of threads. The problem with this program si that it is having some memory leak problems. I am starting the program at around 8MB (RAM memory) and in 1 day i see it at 800MB. I used valgrind to track down this issue and i found the following while running this command time valgrind --leak-check=yes ./test2; : I get this when i use 1000 treads and it is not even finishing. Thread 157: status = VgTs_WaitSys ==16172== at 0x4160F8B

Memory Management, ARC - what to nil?

若如初见. 提交于 2019-12-25 08:47:55
问题 Background - I am using automatic reference counting on a project. The root view is a Table View (Master / Detail setup) showing a list of "slide shows". Click on a table cell and you are taken to the detail view which consists of a Scroll view with views (viewController.view) in it (this is the "slide show"). Each slide show has a front cover and back cover (same view controller formatted differently) that sandwich an variable number of pages. Here is the code to load the slide show: - (void