about deallocation avaudioplayer
look I have a program which have 8 view's (let say) and on each I have buttons which play sounds

I have:

    MainView.h
MainView.m
abcAppDelegate.h
abcAppDelegate.m
abcViewController.h
abcViewController.m

implementation of AVAudioPlayer are done in MainView.m 
like:

    - (IBAction)play1Button_r:(id)sender { 
 
   [theAudio_file1 release];
    NSString *path = [[NSBundle mainBundle] pathForResource:@"snd1_f" ofType:@"aif"];
 	theAudio_file1 = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
    
    if(theAudio_file1 == nil || theAudio_file1.playing == NO)  //if not playing
    {[theAudio_file1 play];}
    else
    {[theAudio_file1 stop];}


so the question is:

where I have to put release for AVAudioPlayer, in what file and how. I have tried to put it in abcViewController.m but that give me error bkz not found such ....

why I am asking you ->

My application works fine but sometimes I press buttons and no sound are played.

I have tested application with Instruments and no leaks are founded

have anybody suggestions?

Many thanks 

about deallocation avaudioplayer
===

look I have a program which have 8 view's (let say) and on each I have buttons which play sounds

I have:

    MainView.h
MainView.m
abcAppDelegate.h
abcAppDelegate.m
abcViewController.h
abcViewController.m

implementation of AVAudioPlayer are done in MainView.m 
like:

    - (IBAction)play1Button_r:(id)sender { 
 
   [theAudio_file1 release];
    NSString *path = [[NSBundle mainBundle] pathForResource:@"snd1_f" ofType:@"aif"];
 	theAudio_file1 = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
    
    if(theAudio_file1 == nil || theAudio_file1.playing == NO)  //if not playing
    {[theAudio_file1 play];}
    else
    {[theAudio_file1 stop];}


so the question is:

where I have to put release for AVAudioPlayer, in what file and how. I have tried to put it in abcViewController.m but that give me error bkz not found such ....

why I am asking you ->

My application works fine but sometimes I press buttons and no sound are played.

I have tested application with Instruments and no leaks are founded

have anybody suggestions?

Many thanks 
