Reusing CIDetector leads to unbound memory growth

Originator:kevin
Number:rdar://16061776 Date Originated:2/13/14
Status:Open Resolved:
Product:iOS Product Version:7.0.4 (11B554a)
Classification: Reproducible:
 
Summary:
When using a CIDetector multiple times, as recommended in the documentation, memory grows unbounded and the feature array is never released.

Steps to Reproduce:
1. Create project that reuses a single CIDetector.
3. Create multiple calls to featuresInImage:
2. Run project in Instruments.

Expected Results:
feature array returned by featuresInImage is returned to app and released by the API.

Actual Results:
feature array returned by featuresInImage is never released by the API, until detector is released.

Comments

I'm running into this as well - it's especially painful since the documentation explicitly says to reuse the same CIDetector. I've tried creating a new CIDetector and wrapping an @autorelease block, neither seem to help free the memory in my case.

By efsubenovex at Oct. 19, 2016, 9:08 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!