2 ms·
An object's refcount being decremented is not an unpredictable time for a pause. If you never allocate or release objects on your audio worker thread, it will n
by plorkyeran 10y ago
An object's refcount being decremented is not an unpredictable time for a pause. If you never allocate or release objects on your audio worker thread, it will never be paused for GC, as the person I was replying to implied could happen.
- vardump 10y agoSure. But same can be said for pretty much any garbage collected system. If you don't create objects or cause objects to become unreachable, you also won't be creating garbage. So you won't have GC pauses. Unless the GC system is braindead and runs even when there's no heap pressure.
- plorkyeran 10y agoWith a stop-the-world garbage collector, allocations on other threads can result in your audio thread being paused, so you have to not be allocating objects on any thread, which is a significantly more difficult requirement than simply not allocating on your audio thread while audio playback is occurring.