マルチスレッドの問題があります。NSOrderedSet を並べ替えて変更していたコードの周りに適切に配置された @synchronized{} は、読み返している部分の問題を解決しているように見えました。私の問題は、自分のコードをよりよく理解できるように、他のスレッドがどこから来ているのかを把握しようとすることです。これらのスニペットのいずれかが新しいスレッドを引き起こしますか?
CADisplayLink* gameTimer;
gameTimer = [CADisplayLink
displayLinkWithTarget:self
selector:@selector(updateDisplay:)];
[gameTimer addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
および/またはこれはスレッドを開始しますか?
AURenderCallbackStruct callbackStruct;
callbackStruct.inputProc = PerformThru;
callbackStruct.inputProcRefCon = &_effectState;
AudioUnitSetProperty( _effectState.rioUnit,
kAudioUnitProperty_SetRenderCallback,
kAudioUnitScope_Global,
bus0,
&callbackStruct,
sizeof(callbackStruct);
AudioOutputUnitStart(_effectState.rioUnit);
PerformThru関数で次のようなデバッグメッセージが表示され始めるため、後で推測しています
Object 0x682ec20 of class __NSOrderedSetM autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
しかし、主に@autoreleasepool ..があるので、別のスレッドを引き起こしている何かがあると推測しています。