A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.marshal.freecotaskmem below:

Marshal.FreeCoTaskMem(IntPtr) Method (System.Runtime.InteropServices) | Microsoft Learn

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Frees a block of memory allocated by the unmanaged COM task memory allocator.

public:
 static void FreeCoTaskMem(IntPtr ptr);
[System.Security.SecurityCritical]
public static void FreeCoTaskMem(IntPtr ptr);
public static void FreeCoTaskMem(IntPtr ptr);
[<System.Security.SecurityCritical>]
static member FreeCoTaskMem : nativeint -> unit
static member FreeCoTaskMem : nativeint -> unit
Public Shared Sub FreeCoTaskMem (ptr As IntPtr)
Parameters
ptr
IntPtr

nativeint

The address of the memory to be freed.

Attributes
SecurityCriticalAttribute
Remarks

You can use FreeCoTaskMem to free any memory allocated by AllocCoTaskMem, ReAllocCoTaskMem, or any equivalent unmanaged method. If the ptr parameter is IntPtr.Zero, the method does nothing.

FreeCoTaskMem exposes the COM CoTaskMemFree function, which frees all bytes so that you can no longer use the memory that the ptr parameter points to.

In addition to FreeCoTaskMem, the Marshal class provides two other memory-deallocation methods: DestroyStructure and FreeHGlobal.

Applies to See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4