3 ms·
I wonder how longjmp() interacts with ARC. My guess is poorly.
by asveikau 12y ago
I wonder how longjmp() interacts with ARC. My guess is poorly.
- bitserf 12y agoYou can manually retain / release using Unmanaged, but that seems like a lot of work when you can mix C/C++ and Swift in the same target.
- ankurpatel 12y agoRight if you are using longjmp you probably want to manage memory youself.
- mikeash 12y agoYou also need to use volatile if you expect writes to variables to persist when calling longjmp(), because any value the compiler decides to stash in a register will be overwritten. Since Swift lacks volatile, you won't be able to make that work properly. It's fun to play with though.