decoder-uninstantiate
- C
- C++
- CSharp
- Java
- JavaScript
- Swift
- Python
- Go
- PHP
status = mte_dec_uninstantiate(decoder);
if (status != mte_status_success)
{
fprintf(stderr, "Failed to uninstantiate decoder (%s): %s\n",
mte_base_status_name(status),
mte_base_status_description(status));
return status;
}
status = decoder.uninstantiate();
if (status != mte_status_success)
{
std::cerr << "Decoder uninstantiate error ("
<< MteBase::getStatusName(status)
<< "): "
<< MteBase::getStatusDescription(status)
<< std::endl;
return status;
}
// Uninstantiate the Decoder
MteStatus decoderStatus = mteDecoder.Uninstantiate();
if(decoderStatus != MteStatus.mte_status_success)
{
// MTE was not uninstantiated as desired so handle failure appropriately
// Below is only an example
throw new Exception("Failed to uninstantiate Decoder. Status: "
+ mteDecoder.GetStatusName(decoderStatus)+ " / "
+ mteDecoder.GetStatusDescription(decoderStatus));
}
// Uninstantiate the Decoder
MteStatus decoderStatus = mteDecoder.uninstantiate();
if(decoderStatus != MteStatus.mte_status_success)
{
// MTE was not uninstantiated as desired so handle failure appropriately
// Below is only an example
throw new Exception("Failed to uninstantiate Decoder. Status: "
+ MteBase.getStatusName(decoderStatus)+ " / "
+ MteBase.getStatusDescription(decoderStatus));
}
// Uninstantiate the Decoder
mteDecoder.uninstantiate();
// free WASM memory
mteDecoder.destroy();
// Uninstantiate the Decoder
let status: mte_status = decoder.uninstantiate()
if status != mte_status_success {
// MTE was not uninstantiated as desired so handle failure appropriately
print("Decoder Uninstantiate error: \(MteBase.getStatusName(status))." +
"Description: \(MteBase.getStatusDescription(status))"
}
# Uninstantiate the Decoder.
decoder_status = mte_decoder.uninstantiate()
if decoder_status != MteStatus.mte_status_success:
# MTE was not uninstantiated as desired so handle failure appropriately.
# Below is only an example.
raise Exception("Failed to uninstantiate Decoder. Status: {0} / {1}\n".format(MteBase.get_status_name(decoder_status),
MteBase.get_status_description(decoder_status)))
// Uninstantiate the Decoder
decoderStatus := mteDecoder.Uninstantiate();
if(decoderStatus != mte.Status_mte_status_success){
// Handle Decoder uninstantiate failure appropriately
// Below is only an example
fmt.Fprintf(os.Stderr, "Decoder uninstantiate error (%v): %v\n",
mte.GetStatusName(decoderStatus), mte.GetStatusDescription(decoderStatus))
return int(decoderStatus)
}
<?php
// Uninstantiate the Decoder
$decoderStatus = $mteDecoder->uninstantiate();
if (constant($decoderStatus) != mte_status_success) {
//----------------------------------------------------
// Handle Decoder uninstantiate failure appropriately
// Below is only an example
echo "Decoder uninstantiate error: "
.$mteDecoder->getStatusName(constant($decoderStatus)).":"
.$mteDecoder->getStatusDescription(constant($decoderStatus));
return $mteDecoder->getStatusCode(constant($decoderStatus));
}
// Clear out $mteDecoder variable
unset($mteDecoder);
?>