leak

Core data relationship memory leak

I have a strange (to me) memory leak when accessing an entity in a relationship. Series and Tiles have an inverse relationship to each other. // set up the fetch request NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Series" inManagedObjectContext:managed...

iPhone real memory climbs when interacting with UI

I've been using the Activity Monitor to check the memory usage of my iPhone apps. I've noticed that the Real Memory climbs whenever I interact with the UI in any way, even if there's no code being called. For example, I can create a brand new View-Based application and run it, and as I click or drag in the empty window the Real Memor...

Is valgrind crazy or is this is a genuine std map iterator memory leak?

Well, I'm very new to Valgrind and memory leak profilers in general. And I must say it is a bit scary when you start using them cause you can't stop wondering how many leaks you might have left unsolved before! To the point, as I'm not an experienced in c++ programmer, I would like to check if this is certainly a memory leak or is it th...

Objective C memory leaking

Hi everyone, I'm creating one Cocoa application for myself and I found a problem. I have two NSTextFields and they're connected to each other as nextKeyViews. When I run this app with memory leaks detection tool and tab through those 2 textboxes for a while, enter some text etc., I start to leak memory. It shows me that the AppKit librar...

Memory leaks in libxml2.2

I am using libxml2 to parse xml content in my iPhone app. The xml content is downloaded from a server similar to the Apple's own TopSongs sample app. When I check for leaks using the Instruments tool, I see memory leaks being reported on xmlNewParserCtxt, xmlNewInputStream and xmlAllocParserInputBuffer. I have called xmlFreeParserCtxt(co...

NSStrings created without alloc, memory leaks

My app is riddled with memory leaks concerning NSString objects. Never, ever do I use alloc to create an NSString object, yet according to Instruments (used with a real device) the app leaks NSString objects. This happens around uses of stringByAppendingString. Example of code: NSString *documentsPathPlusSlash = [self.documentsPath stri...

(iPhone) Instruments can't "Attach to Process"

Actually, I'm using a second generation Ipod Touch. What I'm trying to do is to debug my app on XCode and look for any memory leaks on Instruments at the same time. Is it even possible? Because the "Attach to Process" submenu lists when my app is running (or debugging in this case) but all the items inside this menu are disabled. All I ...

Memory Leak Issue in Weblogic, SUN, Apache and Oracle classes Options

Hi All, Please find below the description of memory leaks issues. Statistics show major growth in the perm area (static classes). Flows were ran for 8 hours , Heap dump was taken after 2 hours and at the end. A growth in Perm area was identified Statistics show from our last run 240MB growth in 6 hour,40mb growth every hour 2GB...

Unmanaged Code calling leads to heavy memory leak!!

Maybe I need change the title as "Unmanaged Code calling leads to heavy memory leak!" The leak is around 30M/hour I think maybe I need complete my code here because the memory leak maybe not from a static string whereas my real code derive this string from external device (see new code attached). so I handle also unmanaged code. Could ...

Can C++ memory leaks negatively affect CPU usage?

Hi all, I have a C++ program that has a pretty terrible memory leak, about 4MB / second. I know where it's coming from and can fix it, but that's not my main problem. My program is taking up a very large amount of CPU usage and it isn't running as fast as I want it to. I have two different threads in the program. One by itself takes ~50...

Firefox Iframe Memory leak

We are working on a JavaScript application that does has been crashing for no reason that we can see. The nature of the application is that it uses javascript to redirect the page every few seconds. and rotates through a number of web pages in a set ammount of time. So in searching for a potential memory leak in our code we set it up t...

sqlite3 - stringWithUTF8String is leaking!

I would appreciate if someone could help me solve my leaking problem. The leaks occur at: aImage, aCategory, aDescription, category and categories. I release them in dealloc, but obviously that is not sufficient: -(void) readListFromDatabase:(char *) sqlStatement { // Setup some globals databaseName = @"mydatabase.sql"; // ...

C++/Qt - Memory allocation question

Hello! I recently started investigating Qt for myself and have the following question: Suppose I have some QTreeWidget* widget. At some moment I want to add some items to it and this is done via the following call: QList<QTreeWidgetItem*> items; // Prepare the items QTreeWidgetItem* item1 = new QTreeWidgetItem(...); QTreeWidgetItem* ...

Is use of LEAKS instrument still common on 3G iPhone?

I'm working with an iPhone 3G, and when I'm trying to investigate memory leaks using the LEAKS instrument, my app crashes. It does not crash when LEAKS is not used. I'm making no claim to having a bug-free or non-memory-intensive app here. But I'd like to investigate leaks on an actual device. When I'm running LEAKS it is incredibly slo...

Android: Memory leak due to AsyncTask

Hello, I'm stuck with a memory leak that I cannot fix. I identified where it occurs, using the MemoryAnalizer but I vainly struggle to get rid of it. Here is the code: public class MyActivity extends Activity implements SurfaceHolder.Callback { ... Camera.PictureCallback mPictureCallbackJpeg = new Camera.PictureCallback() { publi...

iPhone app memory leak

Any idea why this code gives me a memory leak? As you can see, I'm running out of ideas as to what I can do to stop it. - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; NSArray *allSketches = [project.sketches allObjects]; NSMutableArray *temp = [[NSMutableArray alloc] initWithArray:allSketches]; ...

AS2 Net connection memory leak

Hi, I noticed that NetConnection leaks memory var nc:NetConnection = new NetConnection(); var o = new Object(); o.onResult = function () { trace ("onResult"); nc.close(); loadData(); } nc.onStatus = function () { trace ("onStatus"); nc.close(); loadData(); } function loadData () { // some amf serv...

iPhone app memory leaks from core frameworks

Are these kind of leaks normal? Are they false leaks or something I should be concerned with? The instruments tool doesn't give me any line of code from my app, seems Apple's frameworks are leaking?! Ok, the problems could only come from here: (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexP...

Memory leak using NSMutableArray in RootViewController called from App Delegate

I've written code to restore the state of my app, but there's a memory leak in the NSMutableArray. I'm new to Xcode so I apologize if this is something trivial I have overlooked. Any help is appreciated. lq AppDelegate.m - (void)applicationDidFinishLaunching:(UIApplication *)application { [rootViewController restoreState]; } RootV...

Large Memory Leak Using Reachability

Using Instruments on the device it detects a 3.50 KB memory leak using Apple's Reachability 2.0 code in my app. The Leaked Object is GeneralBlock-3584. The leaks tool points to the following code: - (BOOL) startNotifer { BOOL retVal = NO; SCNetworkReachabilityContext context = {0, self, NULL, NULL, NULL}; if(SCNetworkReac...