def _destroy_image_acquirer(self, ia):
id_ = None<EOL>if ia.device:<EOL><INDENT>ia.stop_image_acquisition()<EOL>ia._release_data_streams()<EOL>id_ = ia._device.id_<EOL>if ia.device.node_map:<EOL><INDENT>if ia._chunk_adapter:<EOL><INDENT>ia._chunk_adapter.detach_buffer()<EOL>ia._chunk_adapter = None<EOL>self._logger.info(<EOL>'<STR_LIT>'.format(<EOL>id_<EOL>)<EOL>)<EOL><DEDENT>ia.device.node_map.disconnect()<EOL>self._logger.info(<EOL>'<STR_LIT>'.format(<EOL>id_<EOL>)<EOL>)<EOL><DEDENT>if ia._device.is_open():<EOL><INDENT>ia._device.close()<EOL>self._logger.info(<EOL>'<STR_LIT>'.format(id_)<EOL>)<EOL><DEDENT><DEDENT>ia._device = None<EOL>if id_:<EOL><INDENT>self._logger.info(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(id_)<EOL>)<EOL><DEDENT>else:<EOL><INDENT>self._logger.info(<EOL>'<STR_LIT>'<EOL>)<EOL><DEDENT>if self._profiler:<EOL><INDENT>self._profiler.print_diff()<EOL><DEDENT>self._ias.remove(ia)<EOL>
Releases all external resources including the controlling device.