zentara,
As anyone will tell you, I am addicted to PerlMonks. I try to read every single thread on a daily basis though I no longer have the time to check them several times a day for follow ups.
Ok - so what does this have to do with you and your reply - I have been able to get a good gauge for who is good at what. When it comes to Tk and GUI programming you are obviously no slump. To see you compliment someone else's code without offering suggestions I can only assume it was decent code as I have no clue when it comes to such matters. You went a step further and asserted that there were no memory leaks.
Perhaps you might be willing to let us know how you came to that conclusion? I assume there are certain red flags that you look for coming from a great deal of experience in the matter. As someone who has had GUI programming on his "to-do" list for some time now, I would very much appreciate an education. If the details seem more appropriate in a new thread - that's fine, I am sure I will see it ;-)
Don't feel bad if you don't have the time or just don't feel inclined - I will still look forward to your posts.
| [reply] |
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
| [reply] |
Thanks for the explanation of your memory leak monitor, zentara.
I will definitely investigate it more.
I did get such a kick out of the "beautiful program and no memory leaks either". Though I know you probably didn't mean it humorously, it brought images to my mind of spectators in the Louvre admiring a painting, and saying "such masterful artwork, and he didn't color outside of any of the lines!" :)
Seriously, though, thanks for all of your generous comments and suggestions. As Limbic~Region
aptly notes, they mean a lot coming from an esteemed monk such as yourself.
| [reply] |