How do I close the 'System.Threading.Timer' in my UnityEditor

I always use background threads to do some certain things.
When I stop my unity3d, I find that freeing memory isn’t done during the debugging. Why isn’t freeing memory be done? How do I free the memory?

Have you tried Dispose()?

timer.Dispose();