elem.drop
Drop a passive element data block from memory. After doing this you will not be able to copy the function references from it into a table. This may not actually do anything on the computer it is running on, it is more of a hint than an instruction. The elements may never be removed.

Syntax

elem.drop $passiveElement

Parameters

$passiveElement
This points to a passive data (element...) object.

Example

;; Create table of function references
(table $table 10 funcref)

;; Create element listing function references
(elem $passiveElement func $add $sub $mul)

;; Create function
(func $setupTable
  ;; Set the offset in destination table to copy the elements to
  i32.const 0

  ;; Set the offset in source element data to copy the elements from
  i32.const 0

  ;; Set the number of elements to copy
  i32.const 3

  ;; Initialize the table with the data elements
  table.init $table $passiveElement

  ;; The 3 elements from data are also now in the table

  ;; Remove the passive element data section from memory now that
  ;; we no longer need it
  elem.drop $passiveElement
)