オブジェクトがリリースされたかどうかを確認するにはどうすればよいですか?
UITableViewCell が画面外に移動した場合、kkcell オブジェクトは UITableView によって自動解放されます。
audioPlayer が終了すると、プログラムは " [kkcell stopSpeakAmination]" を呼び出しますが、これによりプログラムがクラッシュします。
- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag{
    [kkcell stopSpeakAmination];
    playing=NO;
}
私も使っています
if(kkcell)
また
if(kkcell!=nil)
しかし、それでもクラッシュします。
ここに私が使用しているいくつかのコードがあります:
//KKMessageCell2.m
....
@property(nonatomic, retain) UIImageView *SenderVoiceNodePlaying;
@property(nonatomic, retain) UIImageView *ReceiverVoiceNodePlaying;
....
-(void)stopSpeakAmination{
    [self.SenderVoiceNodePlaying stopAnimating];
    [self.ReceiverVoiceNodePlaying stopAnimating];
}
-(void)speakAminationOnRight:(UIButton*)btn{
    //rightside
    NSArray *speekImageAry = [[NSArray alloc]initWithObjects:
    [UIImage imageNamed:@"SenderVoiceNodePlaying001"],
    [UIImage imageNamed:@"SenderVoiceNodePlaying002"],
                          [UIImage imageNamed:@"SenderVoiceNodePlaying003"], nil];
    self.SenderVoiceNodePlaying.animationImages = speekImageAry; 
    self.SenderVoiceNodePlaying.animationDuration = 1.0; 
    self.SenderVoiceNodePlaying.animationRepeatCount = 0; 
    [self.SenderVoiceNodePlaying startAnimating];
    NSString *fileName=btn.titleLabel.text;
    fileName=[fileName substringFromIndex:10];
    KKMessageCell2 *cell=(KKMessageCell2*)[btn superview];
    [[NSNotificationCenter defaultCenter]postNotificationName:@"nPlayAmr"
                                    object:nil userInfo:[NSDictionary dictionaryWithObjectsAndKeys:
                                                         fileName,@"fileName",
                                                         cell,@"cell",nil]];
}
//KKMessageCell2.m
....
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *identifier = @"msgCell";
    NSDictionary *dict = [messages objectAtIndex:indexPath.row];
    KKMessageCell2 *cell = [[[KKMessageCell2 alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier] autorelease];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    [cell setCellView:dict andMy_avatar_url:self.my_avatar_url];
    [cell.avatarLeftImageButton addTarget:self action:@selector(pushToUserDetail:) forControlEvents:UIControlEventTouchUpInside];
    [cell.avatarRightImageButton addTarget:self action:@selector(pushToUserDetail:) forControlEvents:UIControlEventTouchUpInside];
    [cell.chatphoto addTarget:self action:@selector(photoClick:) forControlEvents:UIControlEventTouchUpInside];
    return cell;
}
- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag{
    [kkcell stopSpeakAmination];
    playing=NO;
}