What is the opposite of New (class)

I’m curious how one destroys a class,
When one instantiates a class one generally states (e.g. in the folderitem case)
Dim f as new folderitem

How does one close out the class e.g. f
I don’t think coding f = Nil does it.
Or does it?

Yes. I have written that in code, but it isn’t elegant enough

Just remove all the references to the objects and the framework will destroy them for you.

[quote=487997:@Arthur Gabhart]I don’t think coding f = Nil does it.
Or does it?[/quote]

If “f” is the only reference to the object, YES

More info:

https://documentation.xojo.com/topics/debugging/how_xojo_manages_memory.html