iphone - Memory over-release problem when I am animating UIView -
i have enabled nszombie's , getting following message in console when running application:
*** -[uiviewanimationstate release]: message sent deallocated instance 0xf96d7e0
here method performing animation
-(void)loadavatar:(stobject*)st { nsautoreleasepool * pool = [[nsautoreleasepool alloc] init]; avatar.alpha = 0; avatar.frame = avatarrectsmall; avatar.image = [imagecache getmemorycachedimageaturl:st.avatar_url]; [uiview beginanimations:nil context:nil]; [uiview setanimationduration:.50]; avatar.frame = avatarrectnormal; [avatar setalpha:1]; [uiview commitanimations]; [pool release]; pool = nil; }
i don't crash, sometimes. i'm wondering getting released?
you have autorelease pool there prompts me ask, separate thread? if answer yes can't stuff uiview there. uikit not thread safe. can other things calculating positions or updating images later put on screen user interface stuff has happen in main thread.
graphics , drawing section of iphone application programming guide
Comments
Post a Comment