Open philgrida opened 10 years ago
Will take a look at it .
Thank you
I don't see happening do u have arc enabled ??
Yes I am using just the default project you have provided which has ARC enabled. I haven't made any further modifications. Have you tried running it in Instruments using the Allocation template ? I just hooked up the project to a iPad (running iOS7) and the memory (heap etc) was increased every time a photo was taken but it was never reduced.
This is what i get , i don't see going the way u mentioned it.
When I start Instruments the "All Heap and Anonymous VM" Overall Bytes starts at 4MB about but after say a dozen camera shots it has increased to over 570MB. The app will crash after a few more pictures being taken.
Thats not live bytes rite ? . But overall bytes is not much useful here, and it is certainly not leaking memory, so app crashing by running out of memory little doubtful.
Hi, Yes it's not live bytes but overall for the app it will crash after a few camera shots are taken. Have you tried a few camera shots and see it increase ? Do you know why that might be the case ? Is there a cache of some type with the AVCaptureSession or CMSampleBufferRef that is used which can be cleared ?
I didn't crash for me, i tried like 20 or so. The CMSampleBufferRef , i think allocates memory for every shot , If there is cache won't live bytes also increase ??
Thanks. Did you notice the heap being increase though ? Eventually it would crash. I don't think the live bytes would increase necessarily as HEAP is a different part of memory.
I guess this issue might because of strong reference of delegate. Should be fixed now. Give it a shot.
I too have this issue and changing the delegate to assign does not fix it!
Yes I can verify that the delegate fix does not fix the memory issue relating to HEAP issues resulting in the app to crash after a few photos are taken.
Here's the issue: the heap will go down as expected if you wait enough time in between taking pictures. However taking pictures rapidly in a row prevents memory from releasing fast enough so eventually the app will crash. We need a more aggressive approach to recycling the memory....I'll follow up if i think if anything. Please do the same
Yes that is exactly the issue. Will post anything if I find a good mechanism.
reopening this .
i met the same issue too. when taking photo, the memory suddenly increase, and then the app may crash a moment later. however, choose picture from the album is ok.
can u please create a small project and put it in github , i will test this out.
I'm having the same issue.
Any updates on this?
Hi
Thanks for the great library. I have noticed though that when if you Profile the app in Instruments (and select the Allocations template) and if you monitor the "All HEAP allocation" the app rises considerably (about 5-6MB) every time you take a photo. If you then take a quite a few photos, i.e. dozens the app eventually crashes since it has run out of memory. Do you know why this might be the case and can it be fixed ? It seems the memory is not subsequently released or freed.
Phil.