As a new developer I'm a little unsure about how much we should clean up after ourselves with Swift on iOS. There is a lot of different information as this also has changed a lot since the beginning of iOS.
So when we have static Views and use storyboard I get the idea that everything is cleaned for us and we don't have to do (nearly) anything.
But what about when I create my view dynamically based on user clicks? And what is the best approach for clearing up references in case it is necessary?
Right now I'm doing like I'd do in Android simply settings my global reference to nil before I make a new instance of a View etc. I've read this should be done like:
myView?.removeFromSuperview()