diff --git a/NativeScript/runtime/DictionaryAdapter.mm b/NativeScript/runtime/DictionaryAdapter.mm index 0d05b533..8e1060be 100644 --- a/NativeScript/runtime/DictionaryAdapter.mm +++ b/NativeScript/runtime/DictionaryAdapter.mm @@ -256,8 +256,12 @@ - (void)dealloc { self->isolate_ = nullptr; self->cache_ = nil; self->object_ = nil; - CFAutorelease(self->enumerator_); - self->enumerator_ = nullptr; + + if (self->enumerator_ != nullptr) { + CFAutorelease(self->enumerator_); + self->enumerator_ = nullptr; + } + [super dealloc]; }