memory-leaks

Objective-C block not being released for background-only applications

I have an application that runs in the background only (by specifying LSBackgroundOnly in the info.plist file). The problem is, that all blocks that I run on parallel queues are not being released. The (simplified) code looks like below. Blubber is just some dummy class that holds an NSDate for testing. Also, it overwrites retain, rele...

memory usage and minimizing

We have a fairly graphical intensive application that uses the FOX toolkit and OpenSceneGraph, and of course C++. I notice that after running the application for some time, it seems there is a memory leak. However when I minimize, a substantial amount of memory appears to be freed (as witnessed in the Windows Task Manager). When the a...

Android's memory leak because of HttpClient

Hi there, sorry for my English. I'm developing an Android application, consisting in various activities and a service which is activated by "main" activity. The service checks every 3 seconds (this interval is arbitrary) about active network connections into mobile phone. If there's a connection to a PC inside my local network, I then m...

Is this considered memory leak?

The general rule, only objects allocated in the free store can cause memory leaks. But objects created in the stack doesn't. Here is my doubt, int main() { myclass x; ... throw; ... } If throw is not handled, it calls, terminate(), which in turn calls abort() and crashes the application. At this tim...

Why do I have a memory leak? I can't work it out...

Hi all, I've got a memory leak in Instruments... I've sorted some before, but this one has left me stumped! I would be very grateful if you could help... This is the method with the leak... It takes in a dictionary of data, creates a new based on it and returns it. I've commented the lines with the leaks, and the percentages it gives th...

Memory leak in Objective C

Dear Developers, I am getting a potential leak in these methods..can anyone please help me..Leak in method 1 is in line 5..I am referencing this method from another class as [sync loginHandler] where sync is an object of the class which has the method loginHandler.. -(void) loginHandler { 1 SCRMsugarsoap* service = [[SCRMsugarsoap all...

How come my app seems to be holding an image in memory?

I have an IntroViewController with a very large image, which increases the memory of my app by about 1.5MB. The image is set on a UIImageView within the View Controller's NIB. Once the intro has finished, I call release on the IntroViewController, which then successfully calls dealloc on itself and calls release on the large UIImageView...

tools for debugging memory leaks in javascript

Hello, I have a memory leak issue in a rather complex javascript project and am hoping that there are tools that could help me pin-point the cause of the problem. I have tried the google chrome developer tool Profile tab, where I can take snapshots of the HEAP and diff it with previous snapshots. (check http://www.youtube.com/GoogleDev...

What is causing memory leaks?

Hi, What is causing the leaks in this code? I really cannot understand it. On thes lines: 1: NSMutableArray * days = [[NSMutableArray alloc]init]; 2: [dic setObject:days forKey:key]; 3: [days addObject:value]; The whole method: -(void) addValueToDictionary: (NSMutableDictionary *) dic withValue: (NSNumber *) value forKey: (NSString *) ...

Object allocations instrument on iphone

Hey All, I have problem with the way I treat the memory management in iphone..please please help me..I am running out of ideas..I tried to play with the below method but it started leaks when I am trying to allocate the strings for the objects (for example allocation for sid,first_name etc)..I can't figure out how to do..and this is the...

PHP cURL 'Fatal error: Allowed memory size' for large data sets

I know about the option to set the internal memory ini_set("memory_limit","30M"); But I wanted to know if there is a better approach for querying data? I have a WHILE LOOP that checks to see if I need to query for another 1000 records. using the offset as the starting record number and the limit as the returned records, I search for...

AvAudioPlayer memory leaks!?

Hi! Im doing an application that needs to play alot of short sounds (mp3-files). Im using AvAudioPlayer and the sounds are playing just fine, BUT the leaks are building up until my app crashes. I have a seperate class for the player AVSnd.h #import <Foundation/Foundation.h> #import <AVFoundation/AVFoundation.h> @interface AVSoundPla...

NSInvocation Leaks

I am trying to setup an NSInovcation system to launch selectors into background threads using performSelectorInBackground: - So far everything is successful when running the system on instance methods (-), but I also want to support class methods (+). I have adjusted my code to provide an invokeInBackgroundThread for both types of class ...

JAXBContext.newInstance memory leak

After a recent deployment in system test, one of our servlets was getting hit much harder than usual and we noticed memory started climbing and weblogic would eventually die. My intern, I was very proud, discovered the source of the memory leak. Whenever a request comes in, this line gets called: JAXBContext jc = JAXBContext.newInstanc...

Whats a good java debugger?

I'm trying to find memory leaks and performance issues with my java application. Is there a program out there that can help me debug my application and display performance results? Thanks. ...

Detect memory leaks in dbx with new and delete operators

Hello. I'm very interested in using Sun Studio to detect memory leaks in C++ applications with dbx debugger but I think this debugger only shows memory leaks produced by malloc/realloc and free; I'm not sure about this but I've tried with a C++ program and I've obtained no memory leaks. In this case, I'd try Valgrind. If I've done someth...

Where is the memory leak in this code and how to fix it?

In my project I have a method that creates a string from integers (using strcat) and writes it into a file. Unfortunately it does have a memory leak. While tracking that leak down I simplified my code to the following. I can't seem to locate or even fix it. This is the code: #include <stdio.h> #include <stdlib.h> #include <string.h> int...

Valgrind Possibly Lost - MYSQL

I've recently been running one of my apps through Valgrind but there's a few MYSQL related leaks I can't fix. I put the offending code in the most basic form and tested that; I got the same leaks. Should I just disregard them or am I doing something wrong? Code: #include <stdio.h> #include <stdlib.h> #include <mysql/mysql.h> int main...

iPhone known memory leaks - list

Is there a list of known leaks within the iPhone SDK sitting somewhere, all alone? I guess you would have it specified by version. (I just ran my test app - it has a leak outside the project itself (somewhere related to connections) when testing it on a v3.3.1 iPhone 3G, but the leak is not there using an iPhone 4 v4.0.2.). ...

Cannot compile with memory dump for some files

Hi, I use this Debug.h file that I include as the last #include of the files where I want to debug for memory leaks. Then using _CrtDumpMemoryLeaks(); to dump it to my output.. This works fine for most files, but when I include it in some files I get the error below. It looks like it got to do with the boost::unorderer_map<> .. but I ca...