First, fixed the issue of the reference counter of Objective-C. It is needed to call release message explicitly.
[m_texture release];
Second, the buffer pool should be set the limit of number of creating buffer. Currently the limit number is set 10 which should be enough in this situation.
This PR fixes memory leak on macOS/iOS. Fix this issue https://github.com/Unity-Technologies/com.unity.webrtc/issues/868
First, fixed the issue of the reference counter of Objective-C. It is needed to call release message explicitly.
Second, the buffer pool should be set the limit of number of creating buffer. Currently the limit number is set 10 which should be enough in this situation.