Asserting Garbage Collection in Unit Tests

I just read a blog post by Tor Norbye called How to Write a Memory Leak Unit Test. In it, he describes how code from the NetBeans team can be used to find memory leaks. It seems like it’s a more advanced, user-friendly way of doing what I described before. In particular, the chain of references preventing garbage collection is actually printed out during the test.

I definitely have to take a closer look at this. Thanks, Tor!

Share

About Mathias

Software development engineer. Principal developer of DrJava. Recent Ph.D. graduate from the Department of Computer Science at Rice University.
This entry was posted in DrJava. Bookmark the permalink.

One Response to Asserting Garbage Collection in Unit Tests

  1. Pingback: A Concurrent Affair » Blog Archive » Not a Memory Leak, But Not Finalized?

Leave a Reply