public void makeFont( Device device ) {
font = new Font( device );
if ( !font.isDisposed() ) {
//do something...
}
}
}
Solution
To avoid resource leaks, ensure that dispose() is invoked on every org.eclipse.swt.graphics.Font. Note: This rule applies to any form of Font constructor.