4 ms·
You 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.
by bitserf 12y ago
You 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.