IReferenceTrackerHost::DisconnectUnusedReferenceSources method (windows.ui.xaml.hosting.referencetracker.h)

Requests that the host perform a garbage collection and remove all unnecessary reference sources.

Syntax

HRESULT DisconnectUnusedReferenceSources(
  [in] XAML_REFERENCETRACKER_DISCONNECT options
);

Parameters

[in] options

May be 0 or 1; 1 indicates that an application suspend is in progress.

Return value

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

Remarks

This method is expected to potentially cause the reference source to call IReferenceTracker::DisconnectFromTrackerSource, but it is not necessary to call IUnknown::Release immediately on the tracker source. In the CLR, this call triggers a garbage collection, but not a WaitForPendingFinalizers. When flags is one, the garbage collection is executed in the GCCollectionMode.Optimized state.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header windows.ui.xaml.hosting.referencetracker.h

See also

IReferenceTrackerHost