C API question: How to handle an error while freeing object

T

Tim Hunter

This is a C API question.

What's the recommended way to handle an error that occurs while
executing the free function that gets called from GC? (That is, the
function pointed to by the 3rd argument to Data_Wrap_Struct?)

I have a free function that needs to delete one or more temporary files.
If an error occurs while deleting one of these files, what should I do?

I'm pretty sure that calling rb_raise is not the right thing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top