Java's garbage collection cannot be relied on to clean up everything. Specifically, subclasses of ``++org.eclipse.swt.graphics.Resource++`` must be manually ``++dispose()++``-ed when you're done with them. 

Particularly for the ``++Image++`` subclass, which retains an open ``++FileHandle++`` for the life of the instance, failure to properly ``++dispose++`` of ``++Resource++``s can result in a resource leak which could bring first the application and then perhaps the box it's on to their knees. 


== Noncompliant Code Example

----
import org.eclipse.swt.graphics.Image;

public class MyLeakyView {
  Image myImage = new Image("image/path");  // Noncompliant; not disposed
----


== Compliant Solution

----
import org.eclipse.swt.graphics.Image;

public class MyView {
  Image myImage = new Image("image/path");

  public void callMeWhenItsDone() {
    myImage.dispose();
  }
----

