ok. we've found a problem in this code:
SPTexture *texture = [SPTexture textureWithContentsOfFile:string];
EndlessBackground *layer = [[EndlessBackground alloc] initWithTexture:texture];
NSLog(@"layer alloc count %i", [layer retainCount]);
NSLog(@"layer array count %i", [layer retainCount]);
NSLog(@"layer child count %i", [layer retainCount]);
>layer alloc count 1
>layer array count 2
>layer child count 4
so, addChild adds +2 to retain count. and that's possibly the reason of my problem.
noticed that +1 happens after this code in
- (void)addChild:(SPDisplayObject *)child atIndex:(int)index:
SPEvent *addedToStageEvent = [[SPEvent alloc] initWithType:SP_EVENT_TYPE_ADDED_TO_STAGE];
How is that can be?
could you help me please?