Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f4b9de5e32739095685aca7a0a50626bfe4f3211
Ticket: f00009f7ce4b58c8b6caedf976e37ea78be6d3c0
file exists, mtime... procedures leaks
User & Date: RP. on 2015-07-29 13:43:15
Changes

  1. icomment:
    When I run script below, I observe fast and monotonous increase of memory usage in task manager:
    while {1} {
       set path [file join C:/ example.txt]
       file exists $path
    }
    
    Same script, but with "file join" before "while" does not leak:
    set path [file join C:/ example.txt]
    while {1} {
       file exists $path
    }
    
    I've noticed that after "file" operation variable "path" changes it's representation (my guess is that this conversion could be source of the leak):
    % set path [file join C:/ example.txt]
    C:/example.txt
    % ::tcl::unsupported::representation $path
    value is a string with a refcount of 3, object pointer at 000000000021BBA0, internal representation 00000000002159B0:0000000000000000, string representation "C:/example.txt"
    % file exists $path
    0
    % ::tcl::unsupported::representation $path
    value is a path with a refcount of 3, object pointer at 000000000021BBA0, internal representation 0000000000246340:0000000000000000, string representation "C:/example.txt"
    
  2. login: "RP."
  3. mimetype: "text/plain"
  4. username: "RP."