I have an app that we are building that has the following workflow:
- Take a photo
- Scan something
- Submit Info
- Start again
After running through the workflow once, the app will crash on the photo page with the following exception:
Terminating app due to uncaught exception 'STColorFrameUnsupportedFormat', reason: 'Only 640x480, 2048x1536, 2592x1936, 3264x2448 and 4032x3024 color image sizes are supported (non binned).'
This ONLY happens if the scanner is connected even though the scanner is not used on the photo page. I'm guessing it is because the scanner is initializing something and I am not releasing it correctly. Is there a recommended "clean up" or viewWillDismiss code I should be using to make sure I am not holding on to resources once I leave the scanner page?
Note: The scanner page is very similar to the one in the sample app. While I have made a few modifications, most of the changes are just aesthetic.
While I've fixed it so the app doesn't crash anymore, I want to make sure I'm cleaning up everything correctly since i'm having trouble monitoring memory usage since I can't stay connected to the debugger.