iOS: Fix resource leak