Am I allowed to call enif_release_resource() immediately after calling enif_alloc_resource(). The documentation suggests that I should be calling enif_make_resource() in between, but I don't want to do that.<div><br></div>
<div>Furthermore, on a resource that I just allocated with enif_alloc_resource, is there a way to release it without invoking the destructor?</div><div><br></div><div>I am working on a C++11 wrapper for resources. In C++, if construction of a dynamically allocated object throws an exception, the memory gets deallocated without invoking the destructor. I'm trying to reproduce that in a nif resource.</div>
<div><br></div><div>Thanks,</div><div>Dan.</div>