Hi all..
Getting closer to a release.
In Zombies I have a gazillion GSEventRunModal allocs.
Figuring it has to do with My Animation images.
Basically a clock. which ticks second animating to a frame and then pausing.
Do I need to remove the animation after I animate it??
here is the Animation code:
no crashes but Zombies say I keep allocating memory.. and I'd like to plug as many leaks as I can before submission to itunes..
thanks
Ian
ps.
just crashes the app. think because it removes it before complete.. ?si? where is the correct place to do this?? in AnimationDidEnd?? stop???
Getting closer to a release.
In Zombies I have a gazillion GSEventRunModal allocs.
Figuring it has to do with My Animation images.
Basically a clock. which ticks second animating to a frame and then pausing.
Do I need to remove the animation after I animate it??
here is the Animation code:
Code:
-(void)animateTime:(NSArray *)framesArray
timeView:(UIImageView *)timeViewer
position_X:(CGFloat)animPosX
position_Y:(CGFloat)animPosY
totalFrames:(NSInteger)totalFrames
{
//UIImageView *animatedOSeconders = [[UIImageView alloc] initWithFrame:CGRectMake(18.5,315.5, 55.11, 55.11)];
/*
animatedOSeconders = [[UIImageView alloc]
initWithFrame:CGRectMake(animPosX,animPosY, 55.11, 55.11)];
*/
timeViewer.alpha = 1.00;
//[self.window addSubview:heldAnimatedOSeconders];
//[self.window bringSubviewToFront:timeViewer];
[self.window makeKeyAndVisible];
//animatedOSeconders.animationImages = [NSMutableArray arrayWithArray:oSecondesFrames];
timeViewer.animationImages = [NSMutableArray arrayWithArray:framesArray];
// One cycle through all the images takes 1 seconds
timeViewer.animationDuration = (totalFrames/12);
// Repeat forever
timeViewer.animationRepeatCount = 1;
// Add subview and make window visible
//[self.window addSubview:animatedOSeconders];
//[self.window insertSubview:timeViewer aboveSubview:heldAnimatedOSeconders];
[self.window makeKeyAndVisible];
//[animatedOSeconders release];
/*
if (clockStart) {
timeViewer.startAnimating;
}
*/
if (!clockStart) {
//NSLog(@"animation begun");
}
//!(clockStart);
[timeViewer startAnimating];
[self performSelector:@selector(doNothing) withObject:nil afterDelay:(totalFrames/12)];
//[timeViewer removeFromSuperview];
}
no crashes but Zombies say I keep allocating memory.. and I'd like to plug as many leaks as I can before submission to itunes..
thanks
Ian
ps.
Code:
[timeViewer removeFromSuperview];