I am creating a program that will check for directory listing every 2 seconds. I expect this program to run for months without leaking memory or requiring any human interaction.
I am going to assume that you believe there is a leak because your task manager mem usage is going up (which is completely normal). The virtual memory manager is lazy and won't swap out anything unless it needs to. Your GC will clean up anything once a threshold is hit.
The 10000 value is the specified timer interval in milliseconds. As Servy pointed out, you're overwriting it later on so you're accomplishing nothing except maybe getting rid of warnings upon building the project (e.g. uninstantiated object).