XP is just a number | |
PerlMonks |
Re^3: marblesby zentara (Archbishop) |
on Sep 09, 2005 at 12:37 UTC ( [id://490546]=note: print w/replies, xml ) | Need Help?? |
Hi, after writing many Tk programs that run for any period of time, and have alot of "screen action", one of the main problems is Tk's ( and Perl in general) lack of automatic garbage collection. This is not a true memory leak, in the c sense, but just problems with the ref counts of Tk objects not going to zero(for various reasons) and stray objects get left laying around. This can cause the memory usage to climb at a perceptible rate. The first thing I do, with any Tk program is monitor it's memory usage as it runs, to see if it stays stable after a few minutes. See linux memory leak monitor for the handy little monitoring tool I use. These memory gains, usually come when writers undef objects and recreate them, or when objects have photos associated with them. In liverpole's cool program, he just used a single canvas object, so there was no gain, even though it "appeared" he was creating and destroying screen objects. By the way, this memory gain problem in GUI programs is not limited to Tk.....it affects all GUIs. I'm not really a human, but I play one on earth. flash japh
In Section
Code Catacombs
|
|