quartz: Free type libraries on process detach (Valgrind).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9e87c6826e
commit
4beda16757
|
@ -31,8 +31,11 @@ LONG object_locks = 0;
|
||||||
|
|
||||||
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
|
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
|
||||||
{
|
{
|
||||||
if (reason == DLL_PROCESS_DETACH)
|
if (reason == DLL_PROCESS_DETACH && !reserved)
|
||||||
|
{
|
||||||
video_window_unregister_class();
|
video_window_unregister_class();
|
||||||
|
strmbase_release_typelibs();
|
||||||
|
}
|
||||||
return QUARTZ_DllMain(instance, reason, reserved);
|
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]);
|
ITypeInfo_AddRef(*ret = control_typeinfo[tid]);
|
||||||
return S_OK;
|
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);
|
HRESULT strmbase_get_typeinfo(enum strmbase_type_id tid, ITypeInfo **typeinfo);
|
||||||
|
void strmbase_release_typelibs(void);
|
||||||
|
|
||||||
struct strmbase_passthrough
|
struct strmbase_passthrough
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue