Sys.Application.removeComponent Method

Removes the object from the application and disposes the object if it is disposable. This member is static and can be invoked without creating an instance of the class.



The component to remove.

The following example shows a pair of functions that remove a sensitive data component from the application at a fixed time, such as at the end of a business day.

function tick() {
    var d = new Date();
    while($get('DataBox')) {
        window.setInterval(checkTime(d), 100);

function checkTime(d) {
    if (!(8 < d.getHours() < 17)) {