WsResetHeap function

Releases all Heap allocations. Allocations made on the Heap using WsAlloc are no longer valid. Allocation for the Heap object itself is not released.

Syntax


HRESULT WINAPI  WsResetHeap(
  _In_     WS_HEAP*  heap,
  _In_opt_ WS_ERROR* error
);

Parameters

heap [in]

A pointer to a Heap instance to reset. If the heap is not required for the given type this parameter can be NULL.

The heap object.

error [in, optional]

A pointer to a WS_ERROR object where additional information about the error should be stored if the function fails.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The heap object can retain allocated memory even though it has been reset. The amount of memory retained can be specified using the WS_HEAP_PROPERTY_TRIM_SIZE property when creating the heap.

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

WebServices.h

Library

WebServices.lib

DLL

WebServices.dll

 

 

Community Additions

ADD
Show: