Memory Leak for .showsPhysics

I have just recently spent the past 5 hours trying to debug a memory leak in my Spritekit App.

After app Launch, I noticed a small climb in my memory usage.

I spent 3 of those 5 hours digging through reference material, learning about strong VS Weak with ARC (Definitely Recommend Reading up on that for Intermediates Such as myself)

Is anyone else experiencing this issue? If so is there any sort of explanation? Here is a small snippet of my GameViewController:

class GameViewController: UIViewController {

override func viewDidLoad() {

    if let scene = MainMenu(fileNamed:"MainMenu") {
        // Configure the view.
        let skView = self.view as! SKView
        skView.showsFPS = true
        skView.showsNodeCount = true
        skView.multipleTouchEnabled = true
        skView.showsPhysics = true

        /* Sprite Kit applies additional optimizations to improve rendering performance */
        skView.ignoresSiblingOrder = true

        /* Set the scale mode to scale to fit the window */
        scene.scaleMode = .Fill

        //var GameSaveData = GameData()

        // Scene Config
        //scene.Landscape = "Test_Landscape"
        //scene.Area = "Start"


        print("Couldn't Load Game Scene")

As you can see, I'm not doing anything out of the ordinary here. I would Post my gamescene code, but it was all commented out at the time I was still observing the memory leak.


Eventually, out of fustration, I just started commenting lines of code, then building and profiling until the memory leak was solved.

Turns out in my GameViewController.swift file,

skView.showsPhysics = true

was the culprit. This must be somewhat of a new bug seeing as how I haven't seen this issue in < IOS 9.2

skView.showsFPS = true
skView.showsNodeCount = true
skView.showsPhysics = true

Will leak memory by at least .3 MB/s.


skView.showsFields = true

Leaks memory at a rate of 30-40 MB/s. Bad, Apple!

Need Your Help

OpenXML 2 SDK - Word document - Create bulleted list programmatically

ms-word openxml docx bulletedlist

Using the OpenXML SDK, 2.0 CTP, I am trying to programmatically create a Word document. In my document I have to insert a bulleted list, an some of the elements of the list must be underlined. How ...

How to Apply OpenFileDialog Function to a WebApplication

.net web-applications openfiledialog

I am devoloping a Web Application, in which one Page has some neccessity that User should select any folder in the System and for ex if he selects ex:D:\xyz, then this Path should be Saved in Datab...