Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

class method

Fiddle::Pointer.new

Fiddle::Pointer.new(address) => fiddle_cptr
new(address, size) => fiddle_cptr
new(address, size, freefunc) => fiddle_cptr

Create a new pointer to address with an optional size and freefunc.

freefunc will be called when the instance is garbage collected.

See also .malloc .read .[] .to_ptr also in 3.4 · 3.2 · 3.1 · 3.0