You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Win32] GC#drawImage can produce memory leak #2499
Describe the bug
When calling GC#drawImage(), an operation is create (like for every execution on GC) which stores the image to draw. Since the image may be disposed afterwards, a dispose listener is registered to the image, such that the image can be copied and maintained inside the operation in case of a disposal until that operation itself is disposed.
Since the listener is currently not deregistered when disposing the GC and its operations, the GC operations (and thus also the containing GC) will still be referenced (as listeners from the image) until that image is disposed. Since images may be long living (or never be disposed at all), this can lead to a memory leak.
To Reproduce
The following test will unexpectedly fail because the garbage collector cannot clean up the GC instance as it remains referenced from the image.
Activity
[Win32] Fix potential memory leak in GC#drawImage eclipse-platform#2499
[Win32] Fix potential memory leak in GC#drawImage eclipse-platform#2499
[Win32] Fix potential memory leak in GC#drawImage eclipse-platform#2499
[Win32] Fix potential memory leak in GC#drawImage eclipse-platform#2499
[Win32] Fix potential memory leak in GC#drawImage eclipse-platform#2499
[Win32] Fix potential memory leak in GC#drawImage eclipse-platform#2499