Hey, i am using this code to animate something
CATransition *animation = [CATransition animation];
[animation setDuration:0.45f];
[animation setType:kCATransitionPush];
[animation setSubtype:kCATransitionFromRight];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]];
[[theWindow layer] addAnimation:animation forKey:@""];
//[animation release];
I figured i should [release] the animation object when I am done with it, but if i do i get a EXC_BAD_ACCESS
in gdb
Program received signal: “EXC_BAD_ACCESS”.
(gdb) where
#0 0x93c38688 in objc_msgSend ()
#1 0x30506515 in NSPopAutoreleasePool ()
#2 0x305359f0 in __NSFireDelayedPerform ()
#3 0x302454a0 in CFRunLoopRunSpecific ()
#4 0x30244628 in CFRunLoopRunInMode ()
#5 0x32044c31 in GSEventRunModal ()
#6 0x32044cf6 in GSEventRun ()
#7 0x309021ee in UIApplicationMain ()
So i am guessing the I should not release the animation.
Anyone can explain why this is happing? I am used to releasing things and this case is some sort on an exception to this rule. Any thoughts? #8 0x00001d70 in main (argc=1, argv=0xbffff0a4) at