removeFromParent: will not deallocate the node unless his parent was the only person who held reference to it(via parent->child relationship).
In your case if sprite was deallocated on removeFromParent you would see exception for adding nil child, as you suggested. Which leads to a conclusion it was not.
This gave me an idea what happened:
But if I uncommented [self addChild:node2]; The sprite was not deallocated.
You are probably checking for sprite outside of local scope.
{
//Local scope starting
SKNode *node = [SKNode node];
//Node created and exists here
//[self addChild:node];
//Node is not added to scene or parent node(self)
SKSPriteNode* sprite = [SKSpriteNode spriteNodeWithColor:[SKColor blueColor] size:CGSizeMake(30, 30)];
[node addChild:sprite];
}
/*
Local scope ended if node isn't added to parent(self) it get deallocated,
along with the content.
In case //[self addChild:node] was uncommented, node would not be deallocated
and sprite would still be "alive"
*/
As long as someone hold reference to a object it will not be deallocated.