[erlang-questions] nif resources
Thu Jun 24 10:45:19 CEST 2010
> If a resource was created within a thread (and released with
> enif_release_resource), then sent to some erlang process. Will that erlang
> process have a handle to the resource (thus prevent it from being released)
> even if it did not save it anywhere (the variable for the resource was
> This is the behavior I am seeing. Unless I kill the process which received
> the resource, it will never get released. Is there any way to make an erlang
> process release it's handle to the resource?
> I'm using R14A
A resource that is not references by any Erlang process and totally
released with enif_release_resource
should eventually be garbage collected like any other term.
Have you tried erlang:garbage_collect when verifying if the destructor
More information about the erlang-questions