lastfm / lastfm-desktop

The official Last.fm desktop application suite
http://www.last.fm
GNU General Public License v3.0
462 stars 94 forks source link

Fix several memory leaks by using CComPtr/CComBSTR #1

Closed tdebaets closed 12 years ago

tdebaets commented 12 years ago

It seems that the WMP Scrobbler plug-in doesn't release interface pointers returned by WMP. This can be done by explicitly calling Release() on the interface pointers, but instead I've used CComPtr wrappers which handle this for you.

The same applies to COM strings returned by WMP. Here, SysFreeString() should be called to release the strings, but I have again chosen for the wrapper approach (CComBSTR).