AVAudioRecorder does not stay retained
===

I am using AVAudioRecorder in my mac app. In my .m file I declare

    @interface RecordViewController ()
    {
        AVAudioRecorder *audioRecorder;
    ...
    }
    @end

further down I then alloc init the object like so:

    audioRecorder = [[[AVAudioRecorder alloc] initWithURL:soundFileURL settings:recorderSettings error:&error] retain];
    ...
    [audioRecorder prepareToRecord];
    ...
    [audioRecorder record];

I can see that the file gets created, but it only has 4KB. I do not get an error but when I test if `[audioRecorder isRecording]` I can see that [audioRecorder is no longer recording. I am assuming that the object got released, even though I am not using ARC and the dealloc method was not called. 

I had a similar problem with the AVAudioPlayer but the additional `retain]` appended to the alloc init solved that. 

What am I doing wrong?

Thanks


