wasmtime_component_resource_any_drop function

  1. @Native<Pointer<wasmtime_error_t> Function(Pointer<wasmtime_context_t> ctx, Pointer<wasmtime_component_resource_any_t> resource)>(ffi.Pointer<wasmtime_context_t>, ffi.Pointer<wasmtime_component_resource_any_t>)>()
Pointer<wasmtime_error_t> wasmtime_component_resource_any_drop(
  1. Pointer<wasmtime_context_t> ctx,
  2. Pointer<wasmtime_component_resource_any_t> resource
)

\brief Drops a component resource.

This function is required to be called per "logical resource" to clean up any borrow-tracking state in the store, for example. Additionally this may invoke WebAssembly if it's a guest-owned resource with a destructor associated with it.

This operation is not to be confused with wasmtime_component_resource_any_delete which deallocates host-related memory for this resource. After wasmtime_component_resource_any_drop is called it's still required to call wasmtime_component_resource_any_delete.

Implementation

@ffi.Native<
  ffi.Pointer<wasmtime_error_t> Function(
    ffi.Pointer<wasmtime_context_t>,
    ffi.Pointer<wasmtime_component_resource_any_t>,
  )
>()
external ffi.Pointer<wasmtime_error_t> wasmtime_component_resource_any_drop(
  ffi.Pointer<wasmtime_context_t> ctx,
  ffi.Pointer<wasmtime_component_resource_any_t> resource,
);