Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deinit not called on class I added as contentController to PopupController #21

Open
AndreiBoariu opened this issue Jan 19, 2023 · 0 comments

Comments

@AndreiBoariu
Copy link

Hi,

First of all, I am very glad that this library exists, and thanks for all your efforts to implement this.

I found a critical issue.
The deinit function is not called in the viewcontroller I've added as contentController to PopupViewController class.
This means memory is not deallocated.

I've played a little with your provided example, and the same happens on your end.

Also, even if I am adding this in your parent class, deinit is not called in child class:

`deinit {
print("PopupViewController deinit")

    self.contentController?.willMove(toParent: nil)
    self.contentController?.view.removeFromSuperview()
    self.contentController?.removeFromParent()

    self.contentController = nil
    self.contentView = nil
}`

Does anybody have any clue ?

Appreciate

@AndreiBoariu AndreiBoariu changed the title Deinit not called on class I added as controller to PopupController Deinit not called on class I added as contentController to PopupController Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant