Question: I'm looking for a decent WPF or Winform time range selector, much like a home central heating system, where a time range is selectable.

<http://lhill.com.au/l%20hill%20web%20page%20pictures/time%20clock%202.jpg>

Is there any GUI libraries or examples available to fulfill this need?

Answer: 
You are mixing up variables, references and objects.

Doing `delete y;` removes the variable y. As the variable no longer exists, it will naturally no longer have a value. Thus the reference that the variable contained is gone.

Removing the variable will however not in itself remove the object that it was referencing. The array still contains a reference to the object, and neither of those depend on the existance of the variable.

There is actually no way of removing the object directly. You remove objects by destroying all references to it, not the other way around. You want the object to remove it's references, which is simply not how it works.
> 
> This doesnt work:
>  
> ```
> x.push(y);
> ```
> 
> 
> 
> 

Of course it does, it will work exactly as intended - pushing the value of y to the array you created.

The [`delete`](https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Operators/Special_Operators/delete_Operator) operator is specifically for deleting properties on objects, if the expression following the operator does not resolve to a property then nothing happens at all.

```
var y = {"someprop":true};

delete y;
alert(y.someprop); // alerts "true"

```

Try it in your browser window, paste the following into your address bar and hit enter:

```
javascript:var y = {"someprop":true}; delete y; alert(y.someprop);

```