Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Threaded Timer...
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Threaded Timer...
Environment versions
Environment:
VB.NET 1.1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01102225
Message ID:
01102225
Views:
56
I created a class called ThreadedTimer that uses a Threading.Timer object inside it. I then used the class ThrededTimer in a subroutine on the main form of my application. My question is as follows:

When the timer inside my ThreadedTimer class finishes and sets itself to Enabled = False, does garbage collection recycle the memory for this object? The reason I ask is because I create the ThreadedTimer useing a local varaible in a Command Button routine, which when the routine ends, I lose the reference to the timer. I was wondering if I should create an Array off the main form that holds reference to all the timers and then somehow destory each timer manually? The only problem is that my custom class doesn't have a destory method.

I hope I didn't sound too confusing, but this has been bugging me because I don't want to inadvertantly create a memory leak.
________________________
Ben Santiago, MCP & A+
Programmer Analyst (SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS)
Eastern Suffolk BOCES - Student Data Services


Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-Rich Cook
Next
Reply
Map
View

Click here to load this message in the networking platform