The memory usage in Stats sample significantlly increased when updating statistics more frequently. This is a native memory resource of the RTCStatsReport. GC collection can't catch up the speed of inscreasing memory usage.
This PR fixes the issue by calling Dispose method explicitly to destroy the native resource.
The memory usage in Stats sample significantlly increased when updating statistics more frequently. This is a native memory resource of the
RTCStatsReport
. GC collection can't catch up the speed of inscreasing memory usage.This PR fixes the issue by calling
Dispose
method explicitly to destroy the native resource.