Marshal.ZeroFreeCoTaskMemUnicode(IntPtr) Method

Definition

Frees an unmanaged string pointer that was allocated using the SecureStringToCoTaskMemUnicode(SecureString) method.

public:
 static void ZeroFreeCoTaskMemUnicode(IntPtr s);
[System.Security.SecurityCritical]
public static void ZeroFreeCoTaskMemUnicode (IntPtr s);
static member ZeroFreeCoTaskMemUnicode : nativeint -> unit
Public Shared Sub ZeroFreeCoTaskMemUnicode (s As IntPtr)

Parameters

s
IntPtr

The address of the unmanaged string to free.

Attributes

Remarks

The ZeroFreeCoTaskMemUnicode method first zeros out and then frees unmanaged memory that was allocated using the SecureStringToCoTaskMemUnicode method.

Security

SecurityCriticalAttribute
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Applies to