It gets collected as the system gets stuffed. If you create a class, it uses memory the first time it's called. It's memory is used when something ELSE needs it