Closed kou closed 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.
get
is borrowed from rb_memory_view_get_func_t
.
Other candidates:
MemoryView.open
: like File.open
but MemoryView
doesn't open anythingMemoryView.acquire
: release
and acquire
pair is often used in "lock" context but the current context isn't "lock"MemoryView.map
MemoryView.view
We choose MemoryView.export
.
fix #79
Users can release memory views explicitly before process exit.
Reported by xtkoba. Thanks!!!