[erlang-questions] Deterministic destruction of NIF resources

Daniel Goertzen daniel.goertzen@REDACTED
Fri Jul 15 17:05:11 CEST 2016


Here's a sequence I used to get deterministic resource destruction

https://github.com/goertzenator/nifpp/blob/master/examples/nifpptest.erl#L215-L224

It's been a few years since I've run that however; there's a chance newer
Erlangs might break it.

On Fri, Jul 15, 2016 at 8:57 AM Roger Lipscombe <roger@REDACTED>
wrote:

> Who owns NIF resources? When are they garbage collected? They don't
> seem to be owned by the erlang process that called into the NIF to
> allocate the resource, because they're not garbage collected when that
> process dies.
>
> Or, to look at it another way: how do I return a resource from a NIF,
> and have it destructed deterministically?
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160715/15b84491/attachment.htm>


More information about the erlang-questions mailing list