Java Database Connection Memory Leaks

UPDATE: a couple of memory leak articles landed in my inbox today:

  1. Detecting Java Database links

    Identified by the weekly Baeldung weekly Java Spring Blog, 2016-07-15, This article caught my eye with its bock of code for the popular databases to run JUnit tests checking for memory leaks.   It’s good.

  2. A general “Detecting Memory Leaks” Git-Hub project identified by a DZone Article:  The Hitchhikers Guide to GitHub: 13 Java Projects You Should Try”
    1. LeakCanary is an open source library, made to help you stop your memory leaks. You can use it to detect memory leaks in Java (and Android) in your debug builds. As written on their GitHub page, “A small leak will sink a great ship.” (-Benjamin Franklin).

      After you’ve set LeakCanary up, you can configure it to automatically show a notification when an active memory leak is detected. Another possible use is setting up smart pins in order to detect if certain collectibles have been garbage collected or not.


I have not pulled the source code the LeakCanary at blog publish time.  I will share as soon as I play with it, but in the meantime leave your comments for any experiences you may want to share.