Is there a way to have a class delete an instance of itself. I know for variables you can do `del x` but how do you do that for classes? If I do something like:

```
class foo(object):
    x=5
    def __init__(self):
        print "hi"
    def __del__(self):
        del self
        print "bye"

a = foo()
a.__del__()
print a.x

```

The output of the code is

```
hi
bye
5

```

The instance of foo wasn't deleted. Is there a way to make a class do this?