Skip to content

[iOS] _tearDownUI not called with Modal Page #7744

Closed

Description

@farfromrefug
  • CLI: 6.0.4-2019-08-14-054645-13751
  • Cross-platform modules: a few
  • iOS Runtime: 6.1.0-2019-08-28-095325-02

Describe the bug
When you do showModal with a View and not a Frame the _tearDownUI is not called.
This is pretty bad because all JS references are released, so native object dealloced but disposeNativeView is not called.
For example nativescript-material-button will crash because it has an Observer for key/value which has not been removed before the view was deallocated.

To Reproduce
run a showModal with any View. Close the modal view.
_tearDownUI is not called

Expected behavior
_tearDownUI is called like it does when using a Frame

Activity

  1. farfromrefug commented on Aug 28, 2019

    @farfromrefug
    CollaboratorAuthor

    BTW it works with a Frame because viewWillDisappear calls _tearDownUI in the Frame class.

  2. farfromrefug commented on Oct 21, 2019

    @farfromrefug
    CollaboratorAuthor

    @NickIliev Any news on this? This a big memory leak in a sense. People use modals quite often.

  3. CatchABus commented on Apr 2, 2026

    @CatchABus
    Contributor

    Closed by #9801

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions