Open ujrm opened 5 days ago
Describe the bug As images are received from the probe, memory usage continues to increate as rawBytes is never dealocated.
rawBytes
https://github.com/ujrm/solum/blob/02fc7b6002e22e6712150a9c12e09e642801d4b8/examples/solum_swift/Shared/SolumModel.swift#L203
This happens because there's not an autorelease pool if it's not allocated from the main queue.
The solution is to add a deferred deallocation immediately after allocation :
defer { rawBytes.deallocate() }
Bug is present in commit 02fc7b6 but fixed in f64cd39
02fc7b6
f64cd39
To Reproduce Steps to reproduce the behavior:
The allocations with no matching deallocations can also be noted from Instruments.
Environment:
Looks related primarily to NN app, but @julien-l any comments appreciated?
This is an issue with the example app, not with the SDK, I will update our examples with the fix, thanks.
Describe the bug As images are received from the probe, memory usage continues to increate as
rawBytes
is never dealocated.https://github.com/ujrm/solum/blob/02fc7b6002e22e6712150a9c12e09e642801d4b8/examples/solum_swift/Shared/SolumModel.swift#L203
This happens because there's not an autorelease pool if it's not allocated from the main queue.
The solution is to add a deferred deallocation immediately after allocation :
Bug is present in commit
02fc7b6
but fixed inf64cd39
To Reproduce Steps to reproduce the behavior:
The allocations with no matching deallocations can also be noted from Instruments.
Environment: