Swift kill view controller when performing segue
<p>I have View Controller (in ex. B) with AVPlayer for playing music. The problem is, I open this View Controller from another (in ex. A) VC by performing segue and passing the playlist object (songs list). Everything is working pretty fine for the first time, but when I perform segue again (not a unwind segue) to A VC, somehow (I believe) B VC still has the old values and is in the memory (?). And when I tap on another playlist and perform segue to B VC it starts playing music from the new playlist and somehow music starts playing from the old playlist and I get two AVPlayers which I cannot even kill. And if I repeat this step, the number of AVPlayers keeps increasing.</p>

<p>So, the question is (it's not about my code, so no need for that): </p>

<p>Does performing the segue kills the last VC instance(?) ?</p>

<p>If not, how should I present new VC and pass variables to it?</p>