diff --git a/NativeScript/runtime/DictionaryAdapter.mm b/NativeScript/runtime/DictionaryAdapter.mm index 12508695..e94bd239 100644 --- a/NativeScript/runtime/DictionaryAdapter.mm +++ b/NativeScript/runtime/DictionaryAdapter.mm @@ -55,6 +55,10 @@ - (id)nextObject { } - (void)dealloc { + self->isolate_ = nullptr; + self->map_ = nil; + self->cache_ = nil; + [super dealloc]; } @@ -138,6 +142,10 @@ - (NSArray*)allObjects { } - (void)dealloc { + self->isolate_ = nullptr; + self->dictionary_ = nil; + self->cache_ = nil; + [super dealloc]; } @@ -240,6 +248,10 @@ - (void)dealloc { delete wrapper; } self->object_->Reset(); + + self->isolate_ = nullptr; + self->cache_ = nil; + self->object_ = nil; [super dealloc]; }