memory-leaks

Memory leak appears only when multiprocessing

I am trying to use python's multiprocessing library to hopefully gain some performance. Specifically I am using its map function. Now, for some reason when I swap it out with its single processed counterpart I don't get any memory leaks over time. But using the multiprocessing version of map causes my memory to go through the roof. For t...

memory leak when removing objects in NSMutableArray

Hello everyone I hope to store MYFileObj to NSMutableArray (fileArray) and display data on an UITavleView(tableview). //----------------------------------MYFileObj #import <UIKit/UIKit.h> @interface MYFileObj : NSObject { NSString *fileName; } -(void) setFileName:(NSString *)s ; -(NSString *) fileName ; @end the array I ...

Where is my object allocation and memory leak in this iPhone/objective C code?

Hello, I'm still a rookie when it comes to this programming gig and was wondering if someone could help me smooth out this code. Functionally, the code works great and does what I need it to do. But when I run the performance tool the allocation graph peaks, the CPU load is high, there's a leak(s), and I've also confirmed when running on...

Garbage Collection leak? Scripting Bridge leak?

Hello everyone! I'm always really picky about memory leaks and I cannot understand why my garbage collected application leaks. My code is entirely memory-managed and it runs great without garbage collection, not a single leak. However, as soon as I turn on garbage collection it leaks! Just to prove a point, why does this leak in a garb...

ASP.NET web services leak memory when (de)serializing disposable objects?

In the following two cases, if Customer is disposable (implementing IDisposable), I believe it will not be disposed by ASP.NET, potentially being the cause of a memory leak: [WebMethod] public Customer FetchCustomer(int id) { return new Customer(id); } [WebMethod] public void SaveCustomer(Customer value)...

c# memory allocation and deallocation patterns

Since C# uses Garbage Collection. When is it necessary to use .Dispose to free the memory? I realize there are a few situations so I'll try to list the ones I can think of. If I close a Form that contains GUI type object, are those objects dereferenced and therefore will be collected? If I create a local object using new should I .Di...

"Could not register destruction callback" warn message leads to memory leaks?

Hello all, I'm in the exact same situation as this old question: http://stackoverflow.com/questions/2077558/warn-could-not-register-destruction-callback In short: I see a warning saying that a destruction callback could not be registered for some beans. My question is: since the beans whose destruction callback cannot be registered a...

iPhone: Interface Builder leaks memory?

I have been working on an iPhone project, where we created all the user interface programmatically in code. Now I'm going to start a new iPhone project and thinking of using Interface Builder instead, because it has been recommended to me as being a very useful tool, creating less headache than writing everything in code and in general m...

iPhone - Memory Management - Using Leaks tool and getting some bizarre readings.

Hey all, putting the finishing touches on a project of mine so I figured I would run through it and see if and where I had any memory leaks. Found and fixed most of them but there are a couple of things regarding the memory leaks and object alloc that I am confused about. 1) There are 2 memory leaks that do not show me as responsible. ...

.NET RegEx "Memory Leak" investigation

I recently looked into some .NET "memory leaks" (i.e. unexpected, lingering GC rooted objects) in a WinForms app. After loading and then closing a huge report, the memory usage did not drop as expected even after a couple of gen2 collections. Assuming that the reporting control was being kept alive by a stray event handler I cracked op...

Addressing a memory leak stops my UI from showing iphone

Hi I've being getting a memory leak warning with a UITabbarcontroller. If I release the tabbarcontroller the warning goes away but the tabbar will not show any content. If I debug the app with the warning still in it the app runs but will crash after a couple of minutes UITabBarController *tabBarController = [[UITabBarController alloc...

Is the scope of what Xcode's "Build and Analyze" will catch as a leak supposed to be this limited?

It doesn't care about this: NSString* leaker() { return [[NSString alloc] init]; } I thought it would have been smart enough to check if any code paths could call that function without releasing its return value (I wouldn't normally code this way, I'm just testing the analyzer). It reports this as a leak: NSString* leaker() { NSSt...

How to find memory leak from ASPX app having a DLL

Any tips How to figure out where is memory leak in my Facebook app, its ASPX using Facebook toolkit DLL and I am afraid the bug may be in that CS library. The problem is that after one week uptime, server is running out of memory and needs to be rebooted, there are quite many users and I cannot run debugger on this "production server",...

Why .data() function of jQuery is better to prevent memory leaks?

Hi, Regarding to jQuery utility function jQuery.data() the online documentation says: "The jQuery.data() method allows us to attach data of any type to DOM elements in a way that is safe from circular references and therefore from memory leaks. " Why to use: document.body.foo = 52; can result a memory leak -or in what ...

C++ pointers simple question

If I have the following lines inside a loop: Type *unite = new Type(newSize); or double *array= new double[anySize]; what is the behavior in what concerns to memory if I don't have delete operators inside it? It will be constantly allocating objects and arrays on different memory locations, and therefore memory leaks? ...

UINavigationController leak/understanding popViewController

Hello, I have a navigation controller and a table view. When someone click on the table view, I do the following: MyViewController *myViewController = [[MyViewController alloc] initWithImage:image]; [image release]; [self.navigationController pushViewController:myViewController animated:YES]; [myViewController release]; myViewControl...

Memory leak with NSData

I'm having a leak with this code without being able to find where it's coming from. This function get called within an autorelease pool. I release the IplImage* image argument. When I run the ObjAlloc tool, it tells me that "NSData* data" is leaking. If I try to manually release the UIImage returned by this function, I get an EXC_BAD_AC...

Customizing the WebBrowser control in Windows forms

I'm trying to customize the behavior of the WebBrowser control in a Windows forms application. The follwing code works, but as soon as I call SetOptions I get a huge memory leak every time I navigate in the web browser. If I don't call SetOptions I get no memory leak. Has anyone tried this before? [ComVisible(true)] public class Custom...

Do I have to clean custom properties (Expandos) on window.onunload event?

Hi, In one article I have seen that it may be good to clear all expandos on window.unload event to prevent memory leaks. I cannot understand why to do this. Isn't the browser cleaning all the DOM and its relevant resources of it once you leave the page anyway? Thanks, burak ozdogan ...

Memory leak in Mozilla when unloading stylesheets

I'm working with Mozilla v1.7.12 on a constrained device (a Motorola set-top box) trying to resolve some memory leaks. When I dynamically load a stylesheet which refers to some large images, I can see that the amount of consumed memory increases in correspondance with the size of the images. This is what I would expect. Then, when I re...