I'm developing an Audio Unit with a custom view, setting ARC when building it in XCode. When It runs in LogicX everything is fine except after having closed the window of my view. When I try to (re)open it, it crashes in :
void EventListenerDispatcher (void *inRefCon,
void *inObject,
const AudioUnitEvent *inEvent,
UInt64 inHostTime,
Float32 inValue)
{
myCustomView* SELF = (__bridge myCustomView*)inRefCon;
[SELF jaEventListener:inObject
event:inEvent
value:inValue];
}
with a Bad_Access error on the "myCustomView* SELF = ..." line . I suppose that ARC has released the view and, when reopened, the view is not valid anymore. If so, how can I make the view not be released by ARC? Could there be another reason it crashes?