SpriteKit Memory Leak on static Menu scene

user4657331

Im experiencing memory leak on static menu scene, it appears that it happens on every scene, game scene itself but also static menu/gameover. Memory appears to be deallocated correctly (and it's reduced when scene is gone).

Those static scenes does not conatins even update callback defined. It's all setup in didMoveToView and inside it there are couple SKLabelNodes and SKSpriteNode allocated with spriteNodeWithImage.

I have tried to use dealloc to monitor if scene got's deallocated correctly, and it appears to be so it seems it's not the source of the issue.

Browsing google pointed me to some other threads created on stackoverflow that spriteNodeWithImage textureWithImage May cause -Memory leaks -weird error "CUICatalog: Invalid Request: requesting subtype without specifying idiom"

So i have tried to create UIImage imageNamed and then put in into texture and use in SKTexture, actually it has removed CUICatalog error (which anyway, seems like a stupid message which did not been removed by apple - can anyone confirm that ?) But according to memory leaks this didn't help at all, and anyway anything in that scene is being created once on beginning so i have no idea why this memory keeps growing and growing like 0,5mb per sec.

Looking forward for any tips.

Best regards

enter image description here

user4657331

Actually i have found the source of the problem. It seems debugging physics makes huge memory leak

skView.showsPhysics = YES;

It's not a big problem since it happens while debugging only when showsPhysics=YES.

But good to know anyway.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related