Creation of an AVAudioRecorder or AVCaptureSession object is used to record audio and video. These classes have methods to stop recording and release resources.
In addition to unnecessary resources (such as memory and instances of codecs) being held, failure to properly stop and release these objects if they are no longer needed may also lead to continuous battery consumption for mobile devices.
Creation of an
AVAudioRecorder
orAVCaptureSession
object is used to record audio and video. These classes have methods to stop recording and release resources.In addition to unnecessary resources (such as memory and instances of codecs) being held, failure to properly stop and release these objects if they are no longer needed may also lead to continuous battery consumption for mobile devices.
Noncompliant Code Examples
Compliant Solutions