PrepAway - Latest Free Exam Questions & Answers

You need to ensure that the web worker releases memory after processing the algorithms

You develop a Windows Store app that allows users to modify images by using filters and
image-processing algorithms.

The app must meet the following requirements:
• Use a web worker to initiate the image-processing algorithms on a separate thread.
• Clean up the web worker after processing the algorithms.
You need to ensure that the web worker releases memory after processing the algorithms.
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
From the calling page, call the postMessage() command with the terminate parameter.

B.
From the calling page, call the postMessage() command with the clean parameter.

C.
From the web worker, call the close() command.

D.
From the calling page, call the postMessage() command with the close parameter.

Explanation:

In Internet Explorer 10 and Windows Store apps using JavaScript, the Web Workers API
supports the following method .
void close();
Method Description: Terminates the worker thread.
Note: Internet Explorer 10 and Windows Store apps using JavaScript introduce support for
Web Workers. The Web Workers API defines a way to run scripts in the background.


Leave a Reply