Re: [9] Review request for 8155001: SystemTray.remove() leaks GDI Objects in Windows

2016-05-10 Thread Sergey Bylokhov

Looks fine.

On 10.05.16 13:19, dmitry markov wrote:

Hi Sergey,

Thank you for the feedback. Actually I am not sure whether such
situation, (i.e. m_nid.hIcon is NULL) is possible or not. I think it is
better to add null-check there. Please find the updated webrev here:
http://cr.openjdk.java.net/~dmarkov/8155001/webrev.01/

Thanks,
Dmitry
On 06/05/2016 17:06, Sergey Bylokhov wrote:

Hi, Dmitry.
Is it possible that m_nid.hIcon will be NULL in dispose()?

On 06.05.16 14:48, dmitry markov wrote:

Hello,

Could you review the fix for jdk9, please?

bug: https://bugs.openjdk.java.net/browse/JDK-8155001
webrev: http://cr.openjdk.java.net/~dmarkov/8155001/webrev.00/

Problem description:
When TrayIcon is removed from SystemTray, dispose() method will be
called for its peer and corresponding native objects. However HICON
object is not deleted during dispose() invocation. That causes the leak
of GDI objects.

Fix:
Dispose() in awt_TrayIcon.cpp should call DestroyIcon() to avoid leak of
GDI objects.

Thanks,
Dmitry








--
Best regards, Sergey.


Re: [9] Review request for 8155001: SystemTray.remove() leaks GDI Objects in Windows

2016-05-10 Thread dmitry markov

Hi Sergey,

Thank you for the feedback. Actually I am not sure whether such 
situation, (i.e. m_nid.hIcon is NULL) is possible or not. I think it is 
better to add null-check there. Please find the updated webrev here: 
http://cr.openjdk.java.net/~dmarkov/8155001/webrev.01/


Thanks,
Dmitry
On 06/05/2016 17:06, Sergey Bylokhov wrote:

Hi, Dmitry.
Is it possible that m_nid.hIcon will be NULL in dispose()?

On 06.05.16 14:48, dmitry markov wrote:

Hello,

Could you review the fix for jdk9, please?

bug: https://bugs.openjdk.java.net/browse/JDK-8155001
webrev: http://cr.openjdk.java.net/~dmarkov/8155001/webrev.00/

Problem description:
When TrayIcon is removed from SystemTray, dispose() method will be
called for its peer and corresponding native objects. However HICON
object is not deleted during dispose() invocation. That causes the leak
of GDI objects.

Fix:
Dispose() in awt_TrayIcon.cpp should call DestroyIcon() to avoid leak of
GDI objects.

Thanks,
Dmitry