You could use finalizers on the opaque values to free the resources on the other side when they are no longer needed, I’d expect.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
[SOLVED] Safe elimination of `unsafePerformIO`? | 3 | 635 | October 19, 2023 | |
Generalizing `unsafeInterleaveIO` to Functions
|
1 | 411 | September 25, 2023 | |
Is unsafeInterleaveIO idempotent? | 2 | 525 | January 31, 2024 | |
Trick to lift IO into any monad | 9 | 1638 | May 20, 2024 | |
Is unsafeIOToSTM ever safe?
|
6 | 590 | July 28, 2022 |