Closed ardivee closed 1 year ago
Hmm... after a lot of hard work, I still have no idea why memory leaks.
Use some memory leak detection tools, such as _CrtDumpMemoryLeaks
in C++, didn't show there is any large memory leak occurs after play-dispose-play 100 times...
But the Windows Resource Monitor does show the memory usage becomes bigger and bigger during test...
Now I found that the memory leak can be totally eliminated if I remove all the code in OnProcessSample
in video_player_win_plugin.cpp ,
So I think the MyPlayerInternal::m_pBuffer
may be the root cause of memory leak,
but I have no idea why it leaks now :(
I will keep trying ~
Good news ! I tried to build with Flutter 3.7.0, without any code changes, and... there is no memory leaks ~
Please try to build with Flutter 3.7.0 (released in stable channel already)
That fixed it!
When disposing the controller it does not fully release all the memory.