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.
Right if you are using longjmp you probably want to manage memory youself.
You 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.