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?
, scene @property(weak) SKScene *scene;, YES, , .@property(strong) SKScene *scene, , , self.scene = nil;, SKView , - , ( ).
scene
@property(weak) SKScene *scene;
@property(strong) SKScene *scene
self.scene = nil;
SKView
, , / , dealloc / ., . :
dealloc
-(void)dealloc { NSLog(@"Old scene deallocated"); }
( ), , . , .
ARC will free the old scene unless you specifically specify it elsewhere.
By default, it does not refer to a new scene.