HybridCamera: Memory leak

I discovered a memory leak by accident. If you record many videos and cancel all of them right after recording you can see how the memory slowly goes up - until the app crashes: Message from debugger: Terminated due to memory issue I’ve got to go to bed now so I didn’t look into anything. Just wanted to open this issue so I don’t forget it. I verified it with the “eonist” “master”

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 54 (33 by maintainers)

Most upvoted comments

Ok. I can give it a go. Tonight

Your making progress. Shouldn’t be much left now. Good luck on your test.

  • Rewrote the avPlayer and layer such that they are optional now 👍
  • Views in callbacks will retain. This code is meant as a start kit. Its meant to be tweaked and ironed out over time. Thats why its opensource. Im sure we can fix the view retain problem with some weak selfs and guards. There are a lot of callback nesting etc. You can try to to it. And then if you don’t solve it fully, I can try to give it a go tonight.
  • Nice ring

Sure. feel free to solve them. It might fix the vid mem leak problem you are experiencing. Things always slowly build up. And then randomly go down. Create enough views and it will crash. In the 1000s etc.

I suggest you try the develop branch with the latest commits. And see if that works. also maybe delete the project from your iPhone so your sure you get the new project etc.