From: Anton Baskanov baskanov@gmail.com
--- dlls/dmloader/loader.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/dmloader/loader.c b/dlls/dmloader/loader.c index 3798a0851a0..966d6fa1b80 100644 --- a/dlls/dmloader/loader.c +++ b/dlls/dmloader/loader.c @@ -169,9 +169,15 @@ static ULONG WINAPI loader_Release(IDirectMusicLoader8 *iface) TRACE("(%p)->(): new ref = %lu\n", iface, ref);
if (!ref) { + struct cache_entry *obj, *obj2; unsigned int i;
- IDirectMusicLoader8_ClearCache(iface, &GUID_DirectMusicAllTypes); + LIST_FOR_EACH_ENTRY_SAFE(obj, obj2, &This->cache, struct cache_entry, entry) { + if ((obj->Desc.dwValidData & DMUS_OBJ_LOADED) && obj->pObject) + IDirectMusicObject_Release(obj->pObject); + list_remove(&obj->entry); + free(obj); + } for (i = 0; i < ARRAY_SIZE(classes); i++) free(This->search_paths[i]); free(This);