Tcl Library Source Code

View Ticket
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.
Ticket UUID: 688696
Title: Memory Leak in tkchat
Type: Bug Version: None
Submitter: dkf Created on: 2003-02-18 15:14:54
Subsystem: tclapps :: tkchat Assigned To: hartweg
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2003-02-18 22:44:40
Resolution: None Closed By: rmax
    Closed on: 2003-02-18 15:44:40
Description:
There is a memory leak in tkchat; it does not clean up 
unused URL-* tags anywhere.  This doesn't matter too 
much in the main window, where URLs are fairly 
uncommon, but the users-online window at the side is 
filled with URLs and it gets refreshed (with completely 
new URL-* tags) each time.  And yet none of the old 
tags are ever deleted, resulting in the accumulation of 
several thousand dead tags an hour!  This is not good.  
Not good at all!

A possible fix for this is to add the following code to the 
procedure updateNames immediately after the line that 
deletes the old content of the .names widget:
  foreach tagname [.names tag names] {
     if {[string match URL-* $tagname]} {
        .names tag delete $tagname
     }
  }

Please fix this ASAP, as it is a serious leak for anyone 
using Tkchat for longer than an hour or two (as seems 
to be fairly common.)
User Comments: rmax added on 2003-02-18 22:44:40:
Logged In: YES 
user_id=124643

Fix committed to CVS.