Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter13_SavingVideo how to release memory after saving? #3

Open
LNAdmin opened this issue Jul 4, 2014 · 1 comment
Open

Chapter13_SavingVideo how to release memory after saving? #3

LNAdmin opened this issue Jul 4, 2014 · 1 comment

Comments

@LNAdmin
Copy link

LNAdmin commented Jul 4, 2014

Hello, I have a question regarding the code on chapter 13. It works well the only issue I have is that memory usage keeps growing every time I record a new video…. How do you release memory, so the application does not crash… Thank you.

@Troup
Copy link

Troup commented Aug 14, 2014

Interesting: by simply commenting out the dealloc method, I get some memory freed up (but not good enough). Perhaps dealloc prevents Automatic Reference Counting, which is engaged by default in Xcode (after 5.0, I believe)

Edit: Also, there are problems with the Stop Capture button.

  1. You can press it at any time, and will get the "Saved to gallery" message.

  2. It will save whatever the last video was again. This happens even if you close the app and reopen it. (a clue!)

  3. If you take a video and press Stop Capture twice, the app crashes.

Second Edit:

The memory problem seems to be in all recipes that capture an image. We just didn't notice it until it came to video. This could be helpful, since we can backtrack to more simple recipes and solve the problem from there.

(Luckily the Stop Capture button was not disabled by default or else I wouldn't have noticed it could be used to save multiple copies of the last taken video)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants