Finding SWT resources leaks with Sleak

In SWT you must cleanup your allocated resources. Luckily the SWT Composite passed to you, is disposed by the framework so any Widget which you create on this control is disposed for you automatically.

Except Fonts, Colors and Images. For this you should, if possible use the JFace Local ResourceManager.

In case you try to find a resource leak you should have a look at The Sleak tool which allow you to track resource allocation.

About Lars Vogel

Lars Vogel is the founder and CEO of the vogella GmbH and works as Eclipse and Android consultant, trainer and book author. He is a regular speaker at international conferences, He is the primary author of vogella.com. With more than one million visitors per month this website is one of the central sources for Java, Eclipse and Android programming information.
This entry was posted in Eclipse and tagged , . Bookmark the permalink.