I'm struggling with a Swift 6 problem. In my NES emulator, I use a type wrapping `UnsafeMutableBufferPointer<UInt8>` to represent RAM. To avoid leaks, I need to call `deallocate()` on the buffer in my type's `reinit`. Everything is on the Main Actor. In Swift 6...this can't be done without making the wrapper `nonisolated` and manually synchronizing access, I think? Using `Mutex` is too slow, unfortunately.

The code: gist.github.com/sadlerjw/8de96

I'd appreciate any help...maybe @mattiemMatt Massicotte? Thanks!

0

If you have a fediverse account, you can quote this note from your own instance. Search https://micro.sadlerjw.com/users/json/statuses/115579340240870561 on your instance and quote it. (Note that quoting is not supported in Mastodon.)