memory-leaks

Malloc call on delete[] showing up as memory leak in totalview

I am using HDF5 to read a string in to a char* allocated by new[]. I then use a string::assign() call to copy this data to where I actually want it. I then call delete[] on that char*. This is showing up as the source of a memory leak using totalview. It shows mangled calls in stdlibc++ under delete[] to replace_safe, mutate, create,...

android application memory leaks.

I am using kind of results search engine, problem is to remember the searching criteria i made singleton static class which keeps only one instance. In my application there are lots of class level private variables, lots of public static variables, a big util class which contains only static final methods. problem is my application ge...

Why does this erlang code eat so much memory?

I'm going through Cesarini and Thompson's "Erlang Programming" (O'Reilly) and I made a solution to 4-2 but after playing around with it there are two problems: Every time I run go/3, "werl.exe" in windows chews up X amount of RAM. Every subsequent call takes up the same amount and it's never reclaimed. If I run go(Message,10000,10) it ...

Memory leak in trivial stack implementation.

I'm decently experienced with Python and Java, but I recently decided to learn C++. I decided to make a quick integer stack implementation, but it has a massive memory leak that I can't understand. When I pop the node, it doesn't seem to be releasing the memory even though I explicitly delete the old node upon poping it. When I run it, i...

NSMutableArray and property leaking memory

Hi all, I am in memory-leak cleanup mode on my latest app, and have come across something that I am unable to solve. the following method has been cleaned up except for 1 nagging issue. Instruments tells me that my NSMutableArray called itemsToKeep is leaking memory, at the point that I am creating the object. Any ideas on why I am leak...

What is Causing This Memory Leak in Delphi?

I just can't figure out this memory leak that EurekaLog is reporting for my program. I'm using Delphi 2009. Here it is: Memory Leak: Type=Data; Total size=26; Count=1; The stack is: System.pas _UStrSetLength 17477 System.pas _UStrCat 17572 Process.pas InputGedcomFile 1145 That is all there is in the stack. EurekaLog is ...

Are memory leaks "undefined behavior" class problem in C++?

Turns out many innocently looking things are undefined behavior in C++. For example, once a non-null pointer has been delete'd even printing out that pointer value is undefined behavior. Now memory leaks are definitely bad. But what class situation are they - defined, undefined or what other class of behavior? ...

Unix socket: hostent makes memory leaks

Hello, I am writing client for TCP connection and conversion from IP to socket_addr makes memory leaks. There is following process: #include <netdb.h> #include <sys/socket.h> #include <sys/types.h> /** there is some code like method header etc. */ hostent * host = gethostbyaddr( ip, 4, AF_INET ); // ip is char[4], I use IPv4 if ( ...

What is private bytes, virtual bytes, working set?

I am using perfmon windows utility to debug memory leak in a process. Perfmon explaination: Working Set- Working Set is the current size, in bytes, of the Working Set of this process. The Working Set is the set of memory pages touched recently by the threads in the process. If free memory in the computer is above a threshold, pages are...

memory access error when releasing a newly created object

I'm having an issue understanding why releasing an object that I just created is causing a memory access error in my application. I'm creating a bunch of objects and adding them to an NSMutableArray. After I add them to the array, I release them. The first time the function runs, things go smoothly. The second time the function runs,...

Strange SQLite leaks on iPhone

Hi, I'm looking to clean all my app's leaks. As you can see on the picture below, SQLite makes a lot of memory leak. I do use SQLite through CoreData. The strangest thing is that AdresseBook is making all the libsqlite3 leak and I never use the AdressBook!!! Do you have an idea? Thank you :) ...

iPhone Leaks not showing trace

I am running my iPhone App on the simulator and looking for leaks using instruments. The problem is that the trace is not sensible. It does't show any of my code or label any of the system calls. It's all just numbers. ...

Where's the memory leak in this function?

Edit2: I just want to make sure my question is clear: Why, on each iteration of AppendToLog(), the application uses 15mb more? (the size of the original log file) I've got a function called AppendToLog() which receives the file path of an HTML document, does some parsing and appends it to a file. It gets called this way: this.user_ema...

Trying to track down a Silverlight memory leak that only happens in browsers.

This is an odd one. I am making a app that is kind of a game, and I wanted to have a shooting starburst effect. I made it one evening and it all worked well, until I noticed that my browser was eating over 300 megs of ram, eating 1 meg every 5 seconds, mainly when the starburst would happen. Here is an example stripped down to just th...

Best way to plug memory holes in J2EE struts app (without paying money :( )

I have a J2EE struts app running on Weblogic 10.3 which has obviously severe memory issues. My company won't buy 3rd party tools like Jprobe so my only option is to use freely available tools. I have enabled gc logs and observed that memory consumption is unusually high triggering frequent gc cycles. Right now I am configuring JAM consol...

javascript: remove all object elements of an associative array

Hello All, I would like to know the most efficient way of emptying an associative array without causing any memory leak (the values are js objects) Just to be sure, I have tried iterating through the elements of the array, calling 'delete' operation for each element object, so that all of the element objects will become candidates for ...

DOMDocument::load in PHP 5

Hello all, I open a 10MB+ XML file several times in my script in different functions: $dom = DOMDocument::load( $file ) or die('couldnt open'); 1) Is the above the old style of loading a document? I am using PHP 5. Oppening it statically? 2) Do I need to close the loading of the XML file, if possible? I suspect its caus...

javascript, circular references and memory leaks

From what I recall of a not too distant past, Javascript interpreters suffered from memory leaking issues when faced with circular references. Is it still the case in the latest browsers? (e.g. Chrome, FF 3.5 etc) ...

Finding boost::shared_ptr cyclic references

Is there any tips/tricks for finding cyclic references of shared_ptr's? This is an exmaple of what I'm trying to find - unfortunately I can't seem to find the loop in my code. struct A { boost::shared_ptr<C> anC; }; struct B { boost::shared_ptr<A> anA; }; struct C { boost::shared_ptr<B> anB; }; ...

Troubleshoot ASP.net possible memory leak

It looks like there is a possible memory leak with one of our web applications. w3wp.exe is taking about 1.5gb of RAM and our web services are returning an error saying that it is out of memory. Is there a way to determine which application is causing the excessive memory or profile the actively running websites to see what the cause of...