summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2005-12-21 21:00:47 +0000
committerVeronika Irvine <veronika>2005-12-21 21:00:47 +0000
commit9fd959bbb3a60cd51695c8bf244f83d9f1f00394 (patch)
tree05e64cef6997b34d9b6d893213c70fe3cdeaf095
parent8eb3c5627dbf43c31a784f365fbe909f5c9d345a (diff)
downloadeclipse.platform.swt-9fd959bbb3a60cd51695c8bf244f83d9f1f00394.tar.gz
eclipse.platform.swt-9fd959bbb3a60cd51695c8bf244f83d9f1f00394.tar.xz
eclipse.platform.swt-9fd959bbb3a60cd51695c8bf244f83d9f1f00394.zip
Bug 121764 - correcting AddRef/Release reference counting
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java
index 7d0ed876f6..2a6687935c 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java
@@ -299,6 +299,11 @@ private void drag(Event dragEvent) {
dataEffect = DND.DROP_NONE;
}
+/*
+ * EnumFormatEtc([in] dwDirection, [out] ppenumFormatetc)
+ * Ownership of ppenumFormatetc transfers from callee to caller so reference count on ppenumFormatetc
+ * must be incremented before returning. Caller is responsible for releasing ppenumFormatetc.
+ */
private int EnumFormatEtc(int dwDirection, int ppenumFormatetc) {
// only allow getting of data - SetData is not currently supported
if (dwDirection == COM.DATADIR_SET) return COM.E_NOTIMPL;
@@ -453,6 +458,10 @@ private int QueryGetData(int pFormatetc) {
return COM.DV_E_FORMATETC;
}
+/* QueryInterface([in] riid, [out] ppvObject)
+ * Ownership of ppvObject transfers from callee to caller so reference count on ppvObject
+ * must be incremented before returning. Caller is responsible for releasing ppvObject.
+ */
private int QueryInterface(int riid, int ppvObject) {
if (riid == 0 || ppvObject == 0)
return COM.E_INVALIDARG;