Delen via


MemoryManager.TrySetAppMemoryUsageLimit(UInt64) Method

Definition

Tries to set a specific memory cap for the current app or task. In cases where memory caps are shared between foreground and background components, any difference between the default cap and the new request will be assigned to the other component.

public:
 static bool TrySetAppMemoryUsageLimit(unsigned long long value);
 static bool TrySetAppMemoryUsageLimit(uint64_t const& value);
public static bool TrySetAppMemoryUsageLimit(ulong value);
function trySetAppMemoryUsageLimit(value)
Public Shared Function TrySetAppMemoryUsageLimit (value As ULong) As Boolean

Parameters

value
UInt64

unsigned long long

uint64_t

The new memory limit to set.

Returns

Boolean

bool

True if the operation succeeded; otherwise, false.

Windows requirements

Device family
Windows 10 (introduced in 10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v2.0)

Applies to