Posts

Post not yet marked as solved
0 Replies
319 Views
Hi, I have a problem with SKScene memory leakRight after the initilization of a SKScene, memor leak occurs. I don't know what is going on.Here is my code in GameViewController.swift if let scene = MenuScene(fileNamed: "MenuScene") { // Set the scale mode to scale to fit the window //scene.currentSceneName = "MenuScene" scene.scaleMode = .aspectFill scene.size = self.view.frame.size // Present the scene view.presentScene(scene) }I set a breakpoint at the line if let scene = MenuScene(fileNamed: "MenuScene")Before executing the line, there was no memory leak. However, when the program executes the line and advance to next line, memory leak occurs.The backtree for the leaked blocks is @nonobjc SKScene.__allocating_init(fileNamed:) GameViewController.viewDidLoad() @objc GameViewController.viewDidLoad() UIApplicationMain main start
Posted
by zxxz00.
Last updated
.