MemoryManager.TrySetAppMemoryUsageLimit(UInt64) MemoryManager.TrySetAppMemoryUsageLimit(UInt64) MemoryManager.TrySetAppMemoryUsageLimit(UInt64) MemoryManager.TrySetAppMemoryUsageLimit(UInt64) 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 Platform::Boolean TrySetAppMemoryUsageLimit(unsigned __int64 value)
static bool TrySetAppMemoryUsageLimit(UInt64 value) const;
public static bool TrySetAppMemoryUsageLimit(UInt64 value)
Public Shared Function TrySetAppMemoryUsageLimit(value As UInt64) As bool
var bool = Windows.System.MemoryManager.trySetAppMemoryUsageLimit(value);

Parameters

value
UInt64 UInt64 UInt64

The new memory limit to set.

Returns

bool bool bool

True if the operation succeeded; otherwise, false.

Additional features and requirements

Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)