[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

threads (specifically timers) and releasing resources

Alex Hall

3/25/2010 2:31:00 AM

Okay, I have my program and it has three different modes (there will
be more than that). Each mode will have a timer attached to it. If the
mode remains active and the timer runs out, a function specific to
that mode is called. If that mode is switched away from, however, the
timer is canceled and a new timer is created for the mode to which the
user just switched. My question is: what happens with resources taken
up by previous timers, whether they cancel or execute? I would hate
for my program to run for a long time and slowly build up a massive
list of old threads (timers), taking up resources which should have
been released. Will Python perform GC and completely erase a thread
once it is done, or will it keep hanging around? If the latter, is
there a way to completely destroy a thread? Thanks; Google was not too
helpful on this one!

--
Have a great day,
Alex (msg sent from GMail website)
mehgcap@gmail.com; http://www.facebook.c...