NPN_ReleaseVariantValue

我们的志愿者还没有将这篇文章翻译为 中文 (简体) 。加入我们帮助完成翻译!

« Gecko Plugin API Reference « Scripting plugins

Summary

NPN_ReleaseVariantValue() releases the value in the given variant.

Syntax

#include <npruntime.h>
 
void NPN_ReleaseVariantValue(NPVariant *variant);

Parameters

The function has the following parameters:

<tt>variant</tt>
The variant whose value is to be released.

Returns

Nothing.

Description

NPN_ReleaseVariantValue() releases the value in the given variant. This must always be called on result variants and such in this API, i.e. any NPVariant whose value comes from a call that passes back an NPVariant must be released using this function. Access to the value in an NPVariant that has been released will result in undefined behavior.

NPN_ReleaseVariantValue() will call NPN_ReleaseObject() on NPVariants of type NPVARIANTTYPE_OBJECT, and NPN_MemFree() on NPVariants of type NPVARIANTTYPE_STRING.

Document Tags and Contributors

标签:
Contributors to this page: Sheppy, Mcs
最后编辑者: Mcs,