View Single Post
Old 18th February 2021, 01:40   #6
Forum King
thinktink's Avatar
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 3,030
Send a message via Skype™ to thinktink
Just so you know, I am not familiar with C#, just C++ so what I have to point out might be inapplicable.


I noticed the provided function doesn't appear to explicitly free the allocated memory for storing the struct information passed to Winamp in the SendMessage and the memory allocated by "Marshal.AllocCoTaskMem" which MSDN says must be deallocated with "Marshal.FreeCoTaskMem(IntPtr)". From my understanding of Winamp API, both can be safely deallocated/freed after the call to SendMessage returns.
thinktink is offline   Reply With Quote