Does SKTransition on SKScene destroy a SKScene source?

Does SKTransition start in SKScene to destroy the beginning of SKScene?

For instance:

 SKTransition *reveal = [SKTransition revealWithDirection:SKTransitionDirectionDown duration:1.0];
    GameConfigScene *newScene = [[GameConfigScene alloc] initWithSize: CGSizeMake(1024,768)]];
//  Optionally, insert code to configure the new scene.
    [self.scene.view presentScene: newScene transition: reveal];

Will the current scene be destroyed during the transition? Or is it still in memory? Does the new scene link to the old scene?

+3
source share
3 answers

, scene @property(weak) SKScene *scene;, YES, , .
@property(strong) SKScene *scene, , , self.scene = nil;
, SKView ​​ , - , ( ).

+3

, , / , dealloc / ., . :

-(void)dealloc {
    NSLog(@"Old scene deallocated");
}

( ), , . , .

+2

ARC will free the old scene unless you specifically specify it elsewhere.

By default, it does not refer to a new scene.

+1
source

All Articles