memory-leaks

WinDbg not telling me where my string is rooted

I am trying to track down why a string is stored so long in my application, and eating up an excessive amount of memory. I have a Windows Service which runs regularly. It reads data from a database (in the form of a DataSet) and then does some processing - all managed .NET. The Windows Service is triggered once every 5 or so minutes,...

VB.Net 3.5 MDI Application - MDIChild forms stop opening after N memory has been used.

Hi Guys, I hope someone may be able to help! We have a pretty large VB.Net MDI application that has been converted from VB6. When it is first run up with no MDIChild forms opened it uses about 35,000K. As more and more forms are opened (but not closed) the memory usage (according to Task Manager) creeps up at approximately 4,000K per f...

Memory Leak with Ruby 1.9.2 Rails 3.0 Beta 4

I have tried various combinations and find that by simply generating a skeleton Rails 3.0 application, and then running siege http://localhost:3000 My ruby process would then leak a few MB every 5 minutes. The reason I tried this is because I just converted a full blown Rails 2.3 and Ruby Enterprise 1.8.6 application over to Ruby 1.9....

Debug heap memory leak detection - strange results?

I think my C++ application is tight and doesn't leak any memory. Long running stress tests and static code analyzers seem to indicate as much. However, when exercising a very complex usage szenario the Visual Studio 2008 built in debug heap will show a couple of warnings like the following on exit: Detected memory leaks! Dumping objects...

XCode's Build and Analyze - mistake or correct in finding Potential Leaks?

How reliable is Xcode's "Build and Analyze" ? I keep looking for the "potential leak" that it finds - but don't understand it. Here the code: -(void)viewDidLoad{ self.navigationItem.leftBarButtonItem = self.editButtonItem; UIBarButtonItem *aBI = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAdd ...

WebControls and IDisposable

Since WebControls inherit from Control which implement IDisposable. Is it necessary to call Dispose or wrap these WebControls in using statements to prevent memory leaks or does ASP.NET automatically handle this? ...

Instruments says I have a memory leak, but I don't see it

I have a method to generate a Deck object (NSObject subclass with an NSMutableArray property) and it populates the array with Card objects (UIView subclass with some integer and one NSString property). When I ask for a Deck I check to see if one already exists (I think) and if so, release it before getting a new one. The code from my v...

Memory Leak with NSFetchedResultsController objectAtIndex

Hello, I have a memory leak while using NSFetchedResultsController objectAtIndex: The stack frame is as follow: 0 CoreFoundation __CFDataAllocate 1 CoreFoundation __CFDataInit 2 CoreData -[NSSQLCore _prepareResultsFromResultSet:usingFetchPlan:withMatchingRows:] 3 CoreData -[NSSQLCore _newRowsForFetchPlan:selectedBy:withArgu...

Core Data NSSortDescriptor causing memory leak

I am getting a memory leak when I add a sort descriptor to my Fetch Request in Core Data. If I comment out the NSSortDescriptor block it runs without a memory leak in Instruments. NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Pools" inManagedObjectConte...

Weird leak patterns iPhone Development

Hello, I'm finding some weird leaks when running my app in the device with release configuration. But if I run the same app in the device but with debug configuration the leaks are gone. I haven't changed anything in the debug or release configuration files. The debug and release configuration are as they come from the template... Is th...

This may be due to a corruption of the heap, which indicates a bug in cvector.exe or any of the DLLs it has loaded.

I make many mistake in the test program!!! debug src: http://www.cppblog.com/Files/mymsdn/cvector-windows-has-triggered-a-breakpoint-in-cvector.zip the right version: http://www.cppblog.com/Files/mymsdn/cvector-svn-version-10.zip I am trying to write a C language version of vector struction. If I try run (in Microsoft Visual Studio 2...

pkcs#11 memory error - what might be the common reasons?

I am getting the CKR_DEVICE_MEMORY error code for C_Encrypt call using cryptoki library. From the PKCS#11 spec, CKR_DEVICE_MEMORY means The token doesnot have sufficient memory to perform the requested function. Under what circumstances, do we get the token's memory completely full? The HSM has been working 24x7 for 7 days continuous...

System.OutOfMemoryException

I'm trying to fix on an old, clunky, complicated legacy system with a memory leak. I've traced the problem back and the best way to describe the memory leak is that it's "by design." In simple terms, there is an event observer that is holding a reference to objects after they've been abandoned. For this reason objects can't be collected ...

iPhone dev - objc_msgSend with no specific line number

When I usually get runtime errors I can open up the Debugger view in XCode and see what line it occurs and fix accordingly. What do I do when there is no line number? I must have an allocation/deallocation memory error somewhere, but how do I go about finding it? The instruments tool is virtually unuseable and slow - sometimes not loadin...

Android: out of memory exception in Gallery

Hello, My app shows a list of 9 categories and each category displays a Gallery-based coverflow (graciously offered by Neil Davies here) with images of the selected category. The images are fetched from the Web, each ranging from 300K to 500K in size, and stored in an arrayList of Drawables. This data is bound to the coverflow using a B...

ptr_vector - _CrtDumpMemoryLeaks() - memory leaks even though destructor is called

Hi. I'm working on a game engine and in an earlier question it was suggested that I start using boost::ptr_vector to maintain a list of pointers. The basic idea is to have several State's, each State has a SceneGraph. Each state has several resources that they initialize, and then stuff its own SceneGraph. The SceneGraph has a boost::p...

[UIFont fontWithName: size] memory leak on iPhone iOS4?

I have function for adding UILabel to my view: UILabel* AddLabel(UIView* view,CGRect labelRect, UIStyle* labelStyle, NSString* labelText) { UILabel* label = [[[UILabel alloc] initWithFrame:labelRect] autorelease]; label.textColor = [UIColor colorWithCGColor:[ labelStyle.textColor CGColor]]; label.backgroundColor = [UIColor c...

Core Data Memory Leak - iPhone iOS4

Hi guys, I desperately need help with a memory leak in my iPhone app. The app is ready to submit to the app store, is stable, has no memory leaks at all in iPhone simulator or Clang ... but seems riddled with them on my iPod Touch. They all seem to stem from managedObjectModel when I'm trying to retrieve data from Core Data. The Core...

Why is Instruments marking memory leaks on UIColor and NSArray?

Hello, I couldn't realize why this code is being marked as having memory leaks: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { MenuViewController *menuView = [[MenuViewController alloc] initWithNibName:@"MenuView" bundle:[NSBundle mainBundle]]; navigationContr...

Are local objects destructed in the case of a leave on Symbian?

On Symbian, if a function exits because of a leave, are the destructors of its local (automatic) variables called? From what I've tried on the emulator, they are. But then, why use the Cleanup Stack rather then smart pointers? ...