memory-leaks

MSMQ BeginPeek/PeekCompleted memory leak

Using Microsoft MessageQueue there seem to be a memory leak related to the PeekCompleted event. I found a related question on experts exchange from 2005, but with no proper answer/solution: http://www.experts-exchange.com/Programming/Misc/Q_21387840.html Using ANTS Memory Profiler I can see that I get additional pinned instances of Byte...

UACellBackgroundView Memory Leak

Is anyone else out there using the UACellBackgroundView code to do cell gradients. It works like a champ and I want to continue using it, but it is leaking like a sieve. I think instruments says that CGPathCreateMutable() is creating a mutable copy but not releasing. This is a little deeper than my memory management skills. Here is t...

Memory Leak the second time the view loads.

i been cracking my head over this memory leak.. my datasource is mutabledictionary..that i load in the viewdidload. if i dont retain it. i dont have access it it in cellforrowatindexpath. but when i retain it.. it shows up as a memory leak in instruments. i have tried so many different variations.. doesnt seem to get it right. here is...

Unload a module in Python

TL/DR: import gc, sys print len(gc.get_objects()) # 4073 objects in memory # Attempt to unload the module import httplib del sys.modules["httplib"] httplib = None gc.collect() print len(gc.get_objects()) # 6745 objects in memory UPDATE I've contacted Python developers about this problem and indeed it's not going to be possible t...

Memory leak using GtkAnimView

In my C GTK+ application I must load and display images using a GtkAnimView widget. I have a loading function: void loading(GtkWidget *widget, const char* file_path, MainWin* mw) { GError* error; gssize n_read; gboolean res; guchar buffer[LOAD_BUFFER_SIZE]; GInputStream* input_stream; GFile *file = g_fil...

Iphone ==> Leak - [NSCFString substringWithRange:] ???

My app uses a lot of substringWithRange method, almost all over the place. Reading messages from the server (socket), and separating the string to, populate data on the screen. I get random leaks on [NSCFString substringWithRange:], about 128 bytes leak after running the app for 40 minutes. How can a substringToInsex, or substringFromInd...

Is a dynamic array automatically deallocated when it goes out of scope?

in this example procedure foobar; var tab:array of integer; begin setlength(tab,10); end; is the array destroyed or the memory is leaking? ...

Memory Leak in TouchMXL?

Hi all, I'm using TouchXML to parse an XML-stream the following way: CXMLDocument *parser = [[CXMLDocument alloc] initWithXMLString:responseString options:0 error:nil]; [responseString release]; // array holding all the nodes NSArray *directionNodes = [parser nodesForXPath:@"//direction" error:nil]; NSArray *linieNodes = [parser nodes...

How do I merge Valgrind memcheck reports from multiple runs of the same process?

I've got an set of acceptance tests that run nightly. I'd like to use valgrind to check for memory leaks in my code automatically as an additional safe-guard to manually checking for leaks. Updating my scripts to run my processes under valgrind is trivial, however, each test starts and stops a number of processes and there are around 1...

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

Hi all, 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&XM...

memory leak: unable to break on a memory allocation number

I'm trying to locate a memory leak issue. My project is an ATL based dialog project, that uses DirectShow and the standard library. I get a total of 45 memory leaks in my program, all 24 bytes each. I've #define'd _CRTDBG_MAP_ALLOC etc in my stdafx.h, along with DEBUG_NEW to get the file and line numbers for each of the memory leaks. ...

How to solve the leaks in the following code? ObjectiveC

Hi guys, I getting leak here which is written in the appDelegate.m -(NSMutableArray*)getSalutationList { NSMutableArray *list=[[NSMutableArray alloc]init]; [list addObject:@"Dr."]; [list addObject:@"Mr."]; [list addObject:@"Mrs."]; [list addObject:@"Miss."]; [list addObject:@"Ms."]; return list; //return [...

Memory leak for object in array

I've started cleaning up my app before publication - using "Instruments" Leak analyzer. I found a leak I can't plug. So I built a simple project to illustrate the problem. Please see code below. I put a button on the view to test fire the procedure "test". It always generates a leak. First the header and code for an object named "th...

Core Data , NSFetchResultsController leaking

Hi, I am not sure if the leak is in my implementation or is it from apple's side.... Instruments indicate me that I have a leak in this line : if (![[self fetchedResultsController] performFetch:&error]) I am adding annotations by reading the fetchController to the Map.... like this : -(void)fillMapWithAnnotations{ NSError...

Memory leak checking using Instruments on Mac

I've just been pulling my hair out trying to make Instruments cough up my deliberately constructed memory leaks. My test example looks like this: class Leaker { public: char *_array; Leaker() { _array=new char[1000]; } ~Leaker() { } }; void *leaker() { void *p=malloc(1000); int *pa=new int[...

Is there a way to visualize the activity stack (activities in memory) on Android?

I'm currently debugging my app which is quite complex and has up to 5 activity levels. In order to detect memory leaks (i.e. activities that aren't removed from memory even finish() is called, due to some references held somewhere) I want to check which activities are still alive in memory. Currently I create hprof dumps, but it's not v...

Memory Leaks in Browser

Hi Experts, Please tell me how to find out the memory leak in browser and what is the best way to solve the problem. Is there any guideline for writing javascript to avoid memory leak? And also if you can tell me some problem which you experienced related to memory leak and how did you debug and find out the solution would provide a gr...

CATiledLayer large image crashing app

This somewhat related to another post - but that one got kinda messed up - so I start from scratch: I have a CATiledLayer with a HUGE image in it (5780x6700px). The tiled layer is in a scrollview. When I start to scroll around, everything's fine up to a point where obviously too many tiles have been rendered. Then I get a memory warnin...

Memory leak problem .

Hi guys, I am getting leak at: NSString *searchText = [aSearchBar.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; Can anyone suggest how to get out of this memory leak. ...

Delayed Jobs leaking memory?

I'm using collectiveidea's delayed_job with my Ruby on Rails app (v2.3.8), and running about 40 background jobs with it on an 8GB RAM Slicehost machine (Ubuntu 10.04 LTS, Apache 2). Let's say I ssh into my server with no workers running. When I do free -m, I'm see I'm generally using about 1GB of RAM out of 8. Then after starting the w...