Netvent/storyly-sdk

StorylySDK for iOS leaks memory

Closed this issue · 1 comments

lursk commented

A StorylyView (internal component StorylyViewController) holds a strong reference to the rootViewController, which results in that view controller is still in the memory, even though it should be released. Moreover the internal StorylyViewController may have its own reference cycle with the internal StorylyGroupCollectionView, where they hold references to each other.

Environment Details

Storyly SDK Version: --- 1.32.3
iOS SDK Version: --- 16.0
Device Model: --- all
Device OS Version: --- 14.0 - 16.4
Additional Info: ---

Expected Behavior

Once all references to the view controller, which contains a StorylyView, are niled, the view controller is deallocated.

Current Behavior

The view controller is still in the memory.

Steps to Reproduce

  1. In the demo application, in the Demo.storyboard add an empty view controller and set it as a rootViewController of the UINavigationViewController.
  2. Add one button to that view controller.
  3. Link the button's action to show IntegrationViewController
  4. Build and run the app
  5. Tap the button
  6. Navigate back
  7. Open memory graph
  8. Find out that IntegrationViewController is still in the memory along with other Storyly's components.

Hello @lursk,

We've released Storyly iOS SDK 1.32.5. We've tested and improved memory usage of Storyly iOS SDK using memory graph with several scenarios.

Thanks,