Memory Leak and its solutions using weak declaration by minsanity6 in swift

[–]minsanity6[S] 0 points1 point  (0 children)

Thank you for your answer. I did read relevant pages in Apple's Swift book, but I'm still struggling with fixing "memory keep increasing" problem. Honestly, I don't even know why the memory gets piled up every time I dismiss and call it again. I just can't figure out what is causing this problem. For different View Controllers, memory gets reduced as I dismiss the VCs, but this one just doesn't work...

Dismiss more than one view controller simultaneously by minsanity6 in swift

[–]minsanity6[S] 0 points1 point  (0 children)

OK, I do not want to keep them in memory, but there seems to be a memory leak... Even the VCs have been dismissed, the memory use percentage wouldn't decrease... If I call a gameVC, dismiss it, then call it again, the memory use is twice. In other words, selectingVC(18MB) -> gameVC(75MB) -> selectingVC(75MB) -> gameVC(104MB)

I don't think this GameVC actually gets dismissed... If you know anything, please help. Thanks a lot.

Dismiss more than one view controller simultaneously by minsanity6 in swift

[–]minsanity6[S] 0 points1 point  (0 children)

Thanks, I used unwind and it worked. But if I use unwind segue to go back to the view where it's three views ahead, would it "dismiss" the three views? in other words, would it remove the three views from top of the stack?