! [in the memory index the memory was constantly growing simply when adding a physical body to the scene what's the matter I don’t understand you couldn’t tell me what's the matter] 1

- (void)didMoveToView:(SKView *)view { _world = [SKNode node]; [self addChild:_world]; _spinnyNode = [SKSpriteNode spriteNodeWithColor:[UIColor whiteColor] size:(CGSize){50,50}]; _spinnyNode.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame)); _spinnyNode.warpGeometry = nil; [_world addChild:_spinnyNode]; _spinnyNode.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize:_spinnyNode.frame.size]; _spinnyNode.physicsBody.affectedByGravity = NO; } 
  • You already asked this question. why ask him again? Write a comment to the past - Max Mikheyenko
  • in xcode, click command + i, there select 'leaks' and see if there are any memory leaks. then write here where how and how much flows. then we will say - Max Mikheyenko
  • In instruments, leak says that there are no leaks, but on the left side the memory indicator is constantly growing, and I just added a physical body to the stage - Dmitry Shevelev
  • Well, you see, memory does not flow. perhaps you are constantly adding new objects somewhere or something else. Let's watch the code - Max Mikheyenko
  • - (void) didMoveToView: (SKView *) view {_world = [SKNode node]; [self addChild: _world]; _spinnyNode = [SKSpriteNode spriteNodeWithColor: [UIColor whiteColor] size: (CGSize) {50.50}]; _spinnyNode.position = CGPointMake (CGRectGetMidX (self.frame), CGRectGetMidY (self.frame)); _spinnyNode.warpGeometry = nil; [_world addChild: _spinnyNode]; _spinnyNode.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize: _spinnyNode.frame.size]; _spinnyNode.physicsBody.affectedByGravity = NO; } - Dmitry Shevelev

1 answer 1

Indeed, there is such a problem - running memory in physicsBody. It seems impossible to fix it - it is on the apple side. Found some kind of radar on this topic. I cannot advise anything else yet.

https://forums.developer.apple.com/thread/27870

  • I also rummaged everything and saw this forum too. Thank you so much for responding to my problem - Dmitry Shevelev