Community Forums

Home » Vuze Forums » Development » Bug Reports


Thread: Minor SWT Image leak in org.gudy.azureus2.ui.swt.help.HealthHelpWindow


Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 1 - Pages: 1 - Last Post: Jan 4, 2008 12:46 PM Last Post By: TuxPaper
yahave

Posts: 5
Registered: 12/26/07
Minor SWT Image leak in org.gudy.azureus2.ui.swt.help.HealthHelpWindow
Posted: Jan 4, 2008 7:32 AM
  Click to reply to this thread Reply
In org.gudy.azureus2.ui.swt.help.HealthHelpWindow, there are 7 images allocated, but only 5 are disposed when the health help window is closed, leaving 2 images to leak each time the window is displayed. Missing dispose code shown in boldface below.

private static void disposeImages() {
if(grey != null && ! grey.isDisposed()) {
grey.dispose();
}
if(red != null && ! red.isDisposed()) {
red.dispose();
}
if(blue != null && ! blue.isDisposed()) {
blue.dispose();
}
if(yellow != null && ! yellow.isDisposed()) {
yellow.dispose();
}
if(green != null && ! green.isDisposed()) {
green.dispose();
}
if(error != null && ! error.isDisposed()) {
error.dispose();
}
if(share != null && ! share.isDisposed()) {
share.dispose();
}
}
TuxPaper

Posts: 163
Registered: 11/13/07
Re: Minor SWT Image leak in org.gudy.azureus2.ui.swt.help.HealthHelpWindow
Posted: Jan 4, 2008 12:46 PM   in response to: yahave in response to: yahave
  Click to reply to this thread Reply
Ok, I just cleaned up the whole class. I almost wanted to remove it entirely since one can see the meaning of the health icon via the tool tip in the column
Legend
Master: 200 - 999 pts
Expert: 150 - 199 pts
Advanced: 100 - 149 pts
Intermediate: 50 - 99 pts
Beginner: 10 - 49 pts
Newbie: 0 - 9 pts
Vuze Staff Member
Vuze Project Developer
Vuze Community Moderator
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums