class Ethon::Easy::Form

def setup_garbage_collection

def setup_garbage_collection
  # first is a pointer to a pointer. Since it's a MemoryPointer it will
  # auto clean itself up, but we need to clean up the object it points
  # to. So this results in (pseudo-c):
  #   form_data_cleanup_handler = *first
  #   curl_form_free(form_data_cleanup_handler)
  @form_data_cleanup_handler ||= FFI::AutoPointer.new(@first.get_pointer(0), Curl.method(:formfree))
end