Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 229717 Details for
Bug 405711
Memory Leak / COM Leak in OleEventSink.java and IE.java
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch with fix proposal
leakPatch.txt (text/plain), 2.11 KB, created by
Martin Kolb
on 2013-04-15 07:12:23 EDT
(
hide
)
Description:
Patch with fix proposal
Filename:
MIME Type:
Creator:
Martin Kolb
Created:
2013-04-15 07:12:23 EDT
Size:
2.11 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java >index 0e5c23e..229f9c2 100644 >--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java >+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java >@@ -997,13 +997,6 @@ > } > } > } >- /* >- * Dispose all arguments passed in the OleEvent. This must be >- * done to properly release any IDispatch reference that was >- * automatically addRef'ed when constructing the OleEvent. >- */ >- Variant[] arguments = event.arguments; >- for (int i = 0; i < arguments.length; i++) arguments[i].dispose(); > } > }; > site.addEventListener(BeforeNavigate2, oleListener); >@@ -1870,7 +1863,10 @@ > * Feature in IE. Spurious and redundant mousemove events are often received. The workaround > * is to not fire MouseMove events whose x and y values match the last MouseMove. > */ >- if (newEvent.x == lastMouseMoveX && newEvent.y == lastMouseMoveY) return; >+ if (newEvent.x == lastMouseMoveX && newEvent.y == lastMouseMoveY) { >+ event.dispose(); >+ return; >+ } > newEvent.type = SWT.MouseMove; > lastMouseMoveX = newEvent.x; lastMouseMoveY = newEvent.y; > } else if (eventType.equals(EVENT_MOUSEOVER)) { >diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventSink.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventSink.java >index 648195e..f63d66e 100644 >--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventSink.java >+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleEventSink.java >@@ -114,10 +114,17 @@ > offset = offset - size; > } > } >- >+ > OleEvent event = new OleEvent(); > event.arguments = eventInfo; > notifyListener(dispIdMember,event); >+ >+ if (eventInfo != null) { >+ for (int j = 0; j < eventInfo.length; j++){ >+ eventInfo[j].dispose(); >+ } >+ } >+ > return COM.S_OK; > } > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 405711
: 229717 |
232224