Resolved memory consumption issue, Your app was consuming too much memory and did crash for lengthy recording #9
+29
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With current implementation, if you can't record for couple of minutes because the datasetencoder object stores the captured frames and associated depth map and confidence maps and it keeps growing. Eventually the app crashes. The fix i did was, resetting the datsetencoder after a certain interval, let's say 30s and keep track of the last frame that it captured. In this way, you can free up the memory space consumed by your app for lengthy recordings and keep recording for a long time.