EzPopup icon indicating copy to clipboard operation
EzPopup copied to clipboard

Deinit not called on class I added as `contentController` to PopupController

Open AndreiBoariu opened this issue 2 years ago • 0 comments

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 avatar Jan 19 '23 23:01 AndreiBoariu