Frage

In WinRT, do I need to call Close() on IAsyncOperation<T> ^ objects? Either the the operation initiating code, or in the completion handler? If not, why is it there?

War es hilfreich?

Lösung

From your syntax, you're using C++/CX.

For C++/CX, IAsyncOperation::Close is automatically called in the destructor, so you do not need to explicitly call it.

For JS, you must explicitly call .close().

For C#, it's projected as IDisposable, so a using() statement is appropriate.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top