PlaySound has a Memory Leak when called
I have a demo project where I first call
PlaySound (L "High_A. wav", NULL, SND_ASYNC | SND_LOOP);
to play the audio in a loop, and then call
PlaySound (NULL, NULL, NULL) to stop playing.
When I call PlaySound(L "High_A.wav", NULL, SND_ASYNC | SND_LOOP) again. And I found that the Memory (active private working set) and Page faults of audiodg. exe had both increased in the task manager.
After repeating the above operation multiple times, the Memory (active private working set) of audiodg. exe slowly increased and could not be released. Page faults always increase and no release.
Why? Am I using it incorrectly?