#Best way to release Memory for iOS

7 messages · Page 1 of 1 (latest)

shut snow
#

Is there anything else I can do to release memory? I have an app with several lenses. I am already using the following to try to stop the lens and release some memory.

  1. clear()
  2. removing observer for specific lens
  3. removing observer for groupID
  4. removing output
    5.stopRecording()
  5. cameraKit.stop()
  6. cameraKit.stop() with completion
  7. stopRunning()
  8. removing all inputs and outputs

but when I check the memory while using the app, it still piles up when I open a new lens and would crash when I open a certain number of lenses even when I am calling all of those functions after exiting the previously used lens.

unreal trellis
#

Hi @shut snow, what version of the SDK do you use?

shut snow
#

Ver 1.39

unreal trellis
#

Can you try 1.40, we fixed some leaks recently

shut snow
#

same thing keeps on happening even after updating to 1.40

unreal trellis
#

Thanks for trying this out, then it is something else, I'll check with the team

unreal trellis
#

Can you confirm that when doing a complete cleanup SCCameraKitSession instance is also deallocated? You can check that using Debug Memory Tool in Xcode.