ruby / fiddle

A libffi wrapper for Ruby.
BSD 2-Clause "Simplified" License
158 stars 36 forks source link

Add MemoryView.export and MemoryView#release #80

Closed kou closed 3 years ago

kou commented 3 years ago

fix #79

Users can release memory views explicitly before process exit.

Reported by xtkoba. Thanks!!!

mrkn commented 3 years ago

I think these two methods are useful. But, it seems less clear that get with a block implicitly releases the memory view at the end of the block. I want to change the name of get if we can find a more appropriate name.

kou commented 3 years ago

get is borrowed from rb_memory_view_get_func_t.

Other candidates:

kou commented 3 years ago

We choose MemoryView.export.