You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require"ffi"classReleasable < FFI::AutoPointerdefself.release(pointer)puts"Release"# no opendendp=FFI::Pointer.new(1)r=Releasable.new(p)r.freepr.autorelease?# => NullPointerException
It’s because when AutoPointer#free is called, the reaper (managed for releasing the pointer) is reassigned to null. This causes AutoPointer#autorelease? to fail, since reaper is now no longer.
The text was updated successfully, but these errors were encountered:
It’s because when AutoPointer#free is called, the
reaper
(managed for releasing the pointer) is reassigned tonull
. This causes AutoPointer#autorelease? to fail, sincereaper
is now no longer.The text was updated successfully, but these errors were encountered: