memory-leaks

GDI+ Moving Line Memory Leak

I have tried to do this both with GDI+/Invalidate and by using a Line Shape Control. In both cases the memory spirals out of control. To demonstrate, create a windows form application with a timer object which is set to 100ms and enabled and use the following code: Public Class Form1 Private Y As Integer Private intDirection As ...

Why is this .net UIAutomation app leaking/pooling?

I've got an app using .net UIAutomation, it eventually runs out of memory and crashes just monitoring windows being shown and closed. Seemed easier to show this in VB than C# but happens the same either way. It appears to be a leak/pool in the underlying proxy objects. Most of the memory is not being shown as in use as .net memory. An...

Java application memory usage

Hello all. I have been writing a small java application (my first!), that does only a few things at the moment. Currently, it runs the Main class which launches a gui class (a class I wrote that extends JFrame that only contains a JTextArea), a class that loads a local file through a BufferedInputStream that is approximately 40kb, and ...

Is heap memory a common memory location shared by different processes?

Every process can use heap memory to store and share data within the process. We have a rule in programming whenever we take some space in heap memory, we need to release it once job is done, else it leads to memory leaks. int *pIntPtr = new int; . . . delete pIntPtr; My question is, will the heap memory exist when the application/pro...

Web Service client on java, multiple calls to Service.create() case memory leak

I found that the javax.xml.ws.Service.create() multiple calls case memory leak. I solve that issue by reuse the result of this command. I don't understand what was the reason of this memory leak, cause all the members that we declared is local (inside the one method). public String callService() { ................... QName servi...

How can I profile Java memory usage without an instumented JVM (Java 1.1.8)

I am currently trying to determine the cause of high memory usage in a Java application running on an exotic platform where I know of no instrumented JVM. I have the source to the application, and can make changes to the source for the purposes of testing. How can I debug memory usage under these conditions? If more info is needed, I'...

Memory leaks when apply an image mask with CGImageMaskCreate/imageWithCGImage

This code leaks, if someone can tell me why? UIGraphicsBeginImageContext(drawingImage.frame.size); [drawingImage.image drawInRect:CGRectMake(0, 0, drawingImage.frame.size.width, drawingImage.frame.size.height)]; // Draw some vectorial data // ... // Apply an image mask CGImageRef maskRef = mask.CGImage; CG...

Possible memory leak in Silverlight Toolkit Charting component - help!

Hello, Background: I've been using the November 2009 release of the Silverlight Toolkit Charting components in a monitoring application that updates multiple line charts every 10 or so seconds. Each chart has a binding to an ObservableCollection. DataValuePair is simple class containing only two properties (DateTime and int). On each...

SubstringToIndex memory leak

I'm using this function to extract a substring, it works but there are two leaks: -(NSString*)EstraiP:(NSString*)str ini:(NSString*)ini fin:(NSString*)fin occ:(int)occ{ NSRange rstr1; for(int i=0; i < occ; i++){ rstr1=[str rangeOfString:fin]; str=[str substringFromIndex:rstr1.location+rstr1.length]; }...

File handle leak on dynamically loaded DLL caused by activation context

I have a dynamically loaded & unloaded DLL which requires COMCTL32.dll >= v6.0 and MSVCR >= v9.0. To ensure that the correct versions are loaded, I enable manifest file generation in Visual Studio project setting, and add this entry to another manifest file: <dependency> <dependentAssembly> <assemblyIdentity type...

Tomcat Threads Ready

I deployed a web application on a server. I created a script in order to perform load on the application(stress test). The stress generated different requests using 10 threads. I arrived into the following status as shown in the manager of tomcat: Free memory: 34.57 MB Total memory: 1166.43 MB Max memory: 1166.43 MB Max threads: 200 Cu...

On Sandboxing a memory-leaky 3rd-Party DLL

I am looking for a way to cure at least the symptoms of a leaky DLL i have to use. While the library (OpenCascade) claims to provides a memory manager, i have as of yet being unable to make it release any memory it allocated. I would at least wish to put the calls to this module in a 'sandbox', in order to keep my application from not l...

Memory Leaks in Pdf parsin in Iphone

CGPDFPageRef page = CGPDFDocumentGetPage(pdf, pageNumber); if (count == 0) { // printf("`%s' needs at least one page!", filename); return NULL; } document = CGPDFDocumentCreateWithURL (url) These code of line give potential memory leak in this object. Please give me a hint. Thanx in advanced. ...

Getting memory leak at NSURL connection in Iphone sdk.

Hi guys, Here Im getting leak at the NSURL connection in my libxml parser can anyone tell how to resolve it. The code where leak generates is: - (BOOL)parseWithLibXML2Parser { BOOL success = NO; ZohoAppDelegate *appDelegate = (ZohoAppDelegate*) [ [UIApplication sharedApplication] delegate]; NSString* curl; if ([cName length] == 0) { ...

pdf object creating memory leak

I have following code NSString *filePath=[[NSString alloc] initWithString:[[NSBundle mainBundle] pathForResource:pdfname ofType:@"pdf" inDirectory:@"appMasterPdf"]]; NSURL *url = [NSURL fileURLWithPath:filePath]; [filePath release]; CGPDFDocumentRef pdf = CGPDFDocumentCreateWithURL((CFURLRef)url); CGFloat scaleRatio; UIGraphicsBegin...

Memory leak with autoreleased strings iphone

Hi, I'm trying to clean my app from leaks with Leak instrument. It shows me leaks on xml parser (TBXML). Here is a class I'm going to create upon the parsing: @interface GraphPoint : NSObject { NSString* x; NSString* y; } @property (nonatomic, copy) NSString* x; @property (nonatomic, copy) NSString* y; @end @implementation...

Memory profiler software - How to use them? Examples?

If I want to check a program for memory leaks, what method should I use to go about this? What software is available and how do you use that software? I'd like to see if there is a memory leak occuring in some code I have here and I'm not really sure how to check it. Thanks! ...

How to manage the memory yourself? Unhandled exception at 0x00423e3b in memory_manager.exe: 0xC0000005: Access violation reading location 0x00000004.

Unhandled exception at 0x00423e3b in memory_manager.exe: 0xC0000005: Access violation reading location 0x00000004. Souce file Download: http://www.cppblog.com/Files/mymsdn/memory_manager_bug_vs2008_debug.zip Hey, I am trying create a memory manager function to resolve some problem: reference count the new / delete counter when a...

Mem leak in image loader

Hello, I have a function for loading GdkPixbufAnimation from stream. GdkPixbufAnimation* load_image_from_stream(GInputStream* input_stream, GCancellable* generator_cancellable) { GError** error; gboolean res; gssize n_read; guchar buffer[65535]; GdkPixbufAnimation* animation; GdkPixbufLoader* loader; loader = gdk_pixbu...

C++ - Memory leak testing with _CrtDumpMemoryLeaks() - Does not output line numbers

Hi. I'm working on a game with SDL in Visual Studio 2010. I came across the _CrtDumpMemoryLeaks() macro and thought I'd give it a go. Invoking _CrtDumpMemoryLeaks() does print memory leaks to the output window, but it does not show where it happens. I've read the MSDN article at http://msdn.microsoft.com/en-us/library/e5ewb1h3(v=VS.80)...