How to find a Java Memory Leak

I use following approach to finding memory leaks in Java. I’ve used jProfiler with great success, but I believe that any specialized tool with graphing capabilities (diffs are easier to analyze in graphical form) will work. Start the application and wait until it get to “stable” state, when all the initialization is complete and the … Read more

Increasing (or decreasing) the memory available to R processes

From: http://gking.harvard.edu/zelig/docs/How_do_I2.html (mirror) Windows users may get the error that R has run out of memory. If you have R already installed and subsequently install more RAM, you may have to reinstall R in order to take advantage of the additional capacity. You may also set the amount of available memory manually. Close R, then … Read more

java.lang.OutOfMemoryError: bitmap size exceeds VM budget – Android

One of the most common errors that I found developing Android Apps is the “java.lang.OutOfMemoryError: Bitmap Size Exceeds VM Budget” error. I found this error frequently on activities using lots of bitmaps after changing orientation: the Activity is destroyed, created again and the layouts are “inflated” from the XML consuming the VM memory available for … Read more

Implementing IDisposable correctly

This would be the correct implementation, although I don’t see anything you need to dispose in the code you posted. You only need to implement IDisposable when: You have unmanaged resources You’re holding on to references of things that are themselves disposable. Nothing in the code you posted needs to be disposed. public class User … Read more

Finding JavaScript memory leaks with Chrome

A good workflow to find memory leaks is the three snapshot technique, first used by Loreena Lee and the Gmail team to solve some of their memory problems. The steps are, in general: Take a heap snapshot. Do stuff. Take another heap snapshot. Repeat the same stuff. Take another heap snapshot. Filter objects allocated between … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)