Commit 4beda167 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz: Free type libraries on process detach (Valgrind).

parent 9e87c682
......@@ -31,8 +31,11 @@ LONG object_locks = 0;
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
{
if (reason == DLL_PROCESS_DETACH)
if (reason == DLL_PROCESS_DETACH && !reserved)
{
video_window_unregister_class();
strmbase_release_typelibs();
}
return QUARTZ_DllMain(instance, reason, reserved);
}
......
......@@ -68,3 +68,16 @@ HRESULT strmbase_get_typeinfo(enum strmbase_type_id tid, ITypeInfo **ret)
ITypeInfo_AddRef(*ret = control_typeinfo[tid]);
return S_OK;
}
void strmbase_release_typelibs(void)
{
unsigned int i;
for (i = 0; i < ARRAY_SIZE(control_typeinfo); ++i)
{
if (control_typeinfo[i])
ITypeInfo_Release(control_typeinfo[i]);
}
if (control_typelib)
ITypeLib_Release(control_typelib);
}
......@@ -252,6 +252,7 @@ enum strmbase_type_id
};
HRESULT strmbase_get_typeinfo(enum strmbase_type_id tid, ITypeInfo **typeinfo);
void strmbase_release_typelibs(void);
struct strmbase_passthrough
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment