data.drop
After copying data from a passive (data...)
object into memory, if you no longer need it and want to free up the memory, then
you can drop the passive data. After you have dropped the passive data you will not be able to use it again.
This is only a hint to the computer running the WASM module, it may not actually remove the passive data from system memory.
Syntax
data.drop $passiveData
Parameters
$passiveData
This points to a passive (data...)
object to be dropped.
Example
(memory 1)
(data $passiveData "Hello World")
(func $copyPassiveData
i32.const 1024
i32.const 0
i32.const 11
memory.init $passiveData
data.drop $passiveData
)