HomePhorge

(PUP-2738) FFI from_string_to_wide_string block
e833e71bdb1aUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-2738) FFI from_string_to_wide_string block

  • MemoryPointer from_string_to_wide_string previously allocated a new MemoryPointer instance but didn't force callers to scope / free it. This allowed the Ruby runtime to clean it up on GC, but we prefer to force callers to use a block form, to clean up the unmanaged memory when the variable is no longer needed. Refactor the method to yield the ptr.
  • Since the ptr is no longer valid after the block yields, return nil from the method

Details

Provenance
Ethan J. Brown <Iristyle@github>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU1a6c052bf8da: (PUP-2738) FFI::Pointer#read_win32_local_pointer
Branches
Unknown
Tags
Unknown

Event Timeline

Ethan J. Brown <Iristyle@github> committed rPUe833e71bdb1a: (PUP-2738) FFI from_string_to_wide_string block (authored by Ethan J. Brown <Iristyle@github>).Jun 18 2014, 9:14 PM