memory-leaks

problem with MFC Diagnostics

So I gave up implementing my own memoryleak tracking (in this question http://stackoverflow.com/questions/1855406/overloading-new-and-delete-problem ) and try to use the MFC functions to identify my memory leaks. So I do exactly what's described here: http://msdn.microsoft.com/en-us/library/8ky2wh64%28VS.80%29.aspx this is my code: #...

iframe based IE6 javascript memory leak?

Hi, I'm loading in content using an iframe via a menu with jquery which is updating the 'src' attribute of the iframe to then load in the desired page. Each of the pages have their own javascript includes and heavy content. The code is as follows:- $(document).ready(function() { loadPage('main.php'); }); function loadPage(url) { ...

Detecting memory leaks in JavaScript

I have this code, I used this on some of JavaScript components I built for a project. Now I want to know if is there a memory leak on the following code. Which of the options is most appropriate, A or B or is there a better way? var component = function(){ var self = this; //A - not sure there's a leak here this.foo = function...

How to resolve swing listener memory leaks?

Background So I read that often memory leaks within Swing applications originate from the use of various listeners (mouse, key, focus, etc). Essentially, you register an object as a listener and forget to deregister the object, the notifier ends up holding onto the reference of the object, leaking a bit of memory. I knew our applicatio...

Strange issue with System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity

We're writing a system that allows a user to change their account password through a web application on our intranet. At first, everything appeared to be running smoothly. During development passwords for our test accounts could be changed with no problem. When we made the system live, however, we started running into issues. Here are...

How can I use NSZombie in Xcode to find out where is a memory leak going on ?

How can I use NSZombie to find memory leaks? Will it help to display in which file and at what line a memory leak is going on? ...

How to find memory leaks in source code

If it is known that an application leaks memory (when executed), what are the various ways to locate such memory leak bugs in the source code of the application. I know of certain parsers/tools (which probably do static analysis of the code) which can be used here but are there any other ways/techniques to do that, specific to the langua...

valgrind report memory leak when assign a value to a string

Valgrind report memory leak when assign a value to a string I used this simple code to test an memory leak reported by valgrind. /****************************************** * FILE: t3.c * Compiled using : g++ -g t3.c -o t3 * * $ g++ -v * Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/specs * Configured with: ./configure --pre...

Garbage Collection when Attached dependencyobject is destroyed \ disconnected

Hi Guys, When we use any attached property against any dependency object, I thunk it actually maps the property and the value with the dependency object. E.g. <DockPanel><TextBlock x:Name="MyText" DockPanel.Dock="Top"/></DockPanel> Here value "Top" is mapped with DockPanels DockProperty via the dependency object textblock "MyText" ...

Is there an Oracle Open Cursor (ORA-01000) leak in ColdFusion?

Hi, using CFMX7 and Oracle 10g ent on a query-intensive and active web site, I'm having a problem that some of the Oracle connections in my web server connection pool are accumulating open cursors. (In JDBC parlance this might be called a ResultSet object leak.) This is a confusing situation in Oracle; read here for an explanation. htt...

Writing a test case that checks for memory leaks in C++

NOTE: THIS IS NOT HOMEWORK IT IS FROM A PRACTICE EXAM GIVEN TO US BY OUR PROFESSORS TO HELP US PREPARE FOR OUR EXAM I'm currently studying for a programming exam. On one of the sample tests they gave us we have the following question: Suppose you have been given a templated Container that holds an unordered collection of objects. temp...

Lost references in Lua

Having a problem with objects, not needed any more but still having references. Result: size of allocated memory is constantly growing due to not collected objects. How to solve this sort of problem? Is there any way to find objects with only one reference, or objects with lifetime more than some value? Or any another solution? Using L...

Do I have a memory leak in my WPF Navigation?

I'm looking through a WPF application looking for a memory leak (using ANTS Memory Profiler 5.1) and I keep seeing some pages and controls taking up memory when they shouldn't be. So I go to the Object Retention Graph and to see what is keeping them around, and I keep seeing this for every page: The thing is, I have KeepAlive set to ...

Better Flex memory profiling tools

Does anyone know of any better tools that the Flex Builder Profiler? I've googled and googled to no avail. While the FB tools are OK for small apps / small leak situations, they're nowhere near adequate for wading through the thicket of object references that can arise in a large scale Flex app (that is leaking memory heavily). In parti...

Dreaded Could not reserve enough space for object heap

Im trying to get Solr up and running, at first I had the JDK.1.6 working fine, then tomcat running fine too. All of a sudden when trying to run Solr for the first time however I get the error message: [root@78 bin]# ./java -version Error occurred during initialization of VM Could not reserve enough space for object heap Could not create...

memory corruption

i was running a small c program: #include<stdio.h> int main() { char *p; p = (char *)malloc(10); free(p); free(p); free(p); printf("\npointer is freed!!\n"); } basically i am freeing the memory which has already been freed. i think should result in a core dump!!is it not so? but it is printing the pointer is freed!! am i wrong so...

Java Hibernate Memory leak

Hello, I'm developing a Flex application with BlazeDS and I'm experiencing memory leak when using java to query from MySQL in hibernate. Can anyone tell me how to deal with this memory leak? It seems that each time query is invoke java.exe takes more memory. Thanks Sample of my java factory = Persistence.createEntityManagerFactory(PE...

Out of Memory errors - tool for finding classic ASP memory leaks?

I am getting Out of Memory errors in classic ASP, probably where attempting to access data. For example: Microsoft VBScript compilation error '800a03e9' Out of memory (some file) Line 0 These errors only happen once in a while and they keep happening for a few minutes and then the webserver must be restarting the app pool because al...

Batch printing exception

I get this error while printing multiple .xps documents to a physical printer Dim defaultPrintQueue As PrintQueue = GetForwardPrintQueue(My.Settings.SelectedPrinter) Dim xpsPrintJob As PrintSystemJobInfo xpsPrintJob = defaultPrintQueue.AddJob(JobName, Document, False) Documents are spooled succesfully till, a print job exception o...

java.lang.OutOfMemoryError: bitmap size exceeds VM budget - android

Hi I developed an application that uses lots of images on android. The app runs once, fills the information on the screen (Layouts, Listviews, Textviews, ImageViews, etc) and user reads the information. There is no animation, no special effects or anything that can fill the memory. Sometimes the drawables can change. Some are android r...