8155001: SystemTray.remove() leaks GDI Objects in Windows
Reviewed-by: serb, alexp
This commit is contained in:
parent
e931bc512f
commit
7a40b8d5f7
@ -93,6 +93,12 @@ AwtTrayIcon::~AwtTrayIcon() {
|
||||
|
||||
void AwtTrayIcon::Dispose() {
|
||||
SendTrayMessage(NIM_DELETE);
|
||||
|
||||
// Destroy the icon to avoid leak of GDI objects
|
||||
if (m_nid.hIcon != NULL) {
|
||||
::DestroyIcon(m_nid.hIcon);
|
||||
}
|
||||
|
||||
UnlinkObjects();
|
||||
|
||||
if (--sm_instCount == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user