aws / amazon-chime-sdk-ios

An iOS client library for integrating multi-party communications powered by the Amazon Chime service.
https://aws.amazon.com/chime/chime-sdk/
Apache License 2.0
144 stars 67 forks source link

AmazonChimeSDK memory leak #216

Closed denizmersinlioglu closed 3 weeks ago

denizmersinlioglu commented 3 years ago

Describe the bug We noticed memory leak in the AmazonChimeSDKDemo application (and also in our own implementation) originated from AmazonChimeSDK.

To Reproduce Steps to reproduce the behavior:

  1. Open Demo Application
  2. Join a meeting (lets say N times)
  3. Leave the meeting (let say N times)
  4. Open Memory report and see Screenshot1 (You should see increasing memory usage for every join-leave flow)
  5. Open Memory Debugger and see Screenshot2

Expected behavior We expect all allocated objects to be deallocated as soon as we leave the meeting.

Logs Here is the memory leak trace from Xcode-Instruments: https://drive.google.com/drive/folders/1ANQNIOvHVX5Erb7Ooq5Oq7zUTKG92KkO?usp=sharing

Screenshots

  1. Screen Shot 2021-01-21 at 15 10 22
  2. Screen Shot 2021-01-21 at 15 09 25

Test environment Info (please complete the following information):

Additional context 1.In our implementation, we were able to avoid DefaultVideoRenderView leaks by unbind the DefaultVideoRenderView from the audioVideoFacade. 2.The following properties may cause a retain cycle:

piv199 commented 3 years ago

Could you please check for retain cycles, because when I just create DefaultMeetingSession and deallocate it - I have some leftovers in memory... Basically, I'm experiencing quite the same as @denizmersinlioglu .

denizmersinlioglu commented 3 years ago

@hokyungh @zhinang-amazon Thanks for your great effort. Is there any update on MediaSDK layer memory leaks?

hokyungh commented 3 years ago

@denizmersinlioglu sorry for late update. v0.16.0 should contain some memory leak fix in the SDK layer. It doesn't solve all the issue, but it should some memory fix in the SDK layer. We'll work to resolve rest of memory leak fixes on the MediaSDK layer.

georgezy-amzn commented 3 weeks ago

Closing this due to inactivity. Please reopen or submit a support case if this is still an issue.