Maarten Lankhorst : mmdevapi: Add test showing collection doesn' t keep ref on parent.
Alexandre Julliard
julliard at winehq.org
Tue Jan 5 11:37:51 CST 2010
Module: wine
Branch: master
Commit: f10d56088e546c76a8aec2abe4b742c80bf779f7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f10d56088e546c76a8aec2abe4b742c80bf779f7
Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Mon Dec 14 18:16:40 2009 +0100
mmdevapi: Add test showing collection doesn't keep ref on parent.
---
dlls/mmdevapi/tests/mmdevenum.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/mmdevapi/tests/mmdevenum.c b/dlls/mmdevapi/tests/mmdevenum.c
index cff72a0..9e8e55c 100644
--- a/dlls/mmdevapi/tests/mmdevenum.c
+++ b/dlls/mmdevapi/tests/mmdevenum.c
@@ -41,6 +41,11 @@ static void test_collection(IMMDeviceEnumerator *mme, IMMDeviceCollection *col)
UINT numdev;
IMMDevice *dev;
+ /* collection doesn't keep a ref on parent */
+ IUnknown_AddRef(mme);
+ ref = IUnknown_Release(mme);
+ ok(ref == 2, "Reference count on parent is %u\n", ref);
+
ref = IUnknown_AddRef(col);
IUnknown_Release(col);
ok(ref == 2, "Invalid reference count %u on collection\n", ref);
More information about the wine-cvs
mailing list