audiovisualizer icon indicating copy to clipboard operation
audiovisualizer copied to clipboard

Memory leak

Open hig-dev opened this issue 5 years ago • 1 comments

Steps to reproduce:

Hint: You have to enable native profiling and disable Just My Code in the memory profiling settings.

  1. Debug the sample app "VisualizationPlayer" with memory profiling
  2. Open a music file
  3. Force GC and make memory snapshot
  4. Repeatedly open the same or another music file. On every new opening of a music file the memory usage will increase. Do this 5-10 times.
  5. Force GC and make memory snapshot
  6. You will see that the memory usage has increased a lot.

Screenshot: image

Link to diagsession (300MB): https://send.firefox.com/download/f52b09a111a056c9/#2wL5zmgjieB-jPciQQTAcg

hig-dev avatar May 26 '19 04:05 hig-dev

I now found the exact source of the memory leak, after opening a music file, a new ring buffer will be allocated and the old one won't be released from memory: image

Better diagsession (275MB): https://send.firefox.com/download/d5a2a65ca2046481/#ZZYWME7FDG5vUhWMZkZ5wg

hig-dev avatar May 26 '19 16:05 hig-dev