devxoul / URLNavigator

⛵️ Elegant URL Routing for Swift
MIT License
3.26k stars 297 forks source link

Facing memory leaks while using URLOpenHandler #43

Open therudite opened 7 years ago

therudite commented 7 years ago

I think we are using a singleton inside a closure which results in a memory leak. In addition to that there are other leaks as well.

Navigator.map("http://first") { [unowned self] _ in
            let vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "first") as! FirstViewController
            Navigator.push(vc)
            return true
        }

image

devxoul commented 7 years ago

@therudite, Thanks for reporting! Do you have any idea to fix this?