> Am 27.09.2016 um 10:05 schrieb ms...
gmail.com:
> > Hello,
> >
> > I use a tclkit to distribute my application and one of our users has reported that each time he executes the application a directory (TCL00001928 or similar) is created in his C:\Users\USER\AppData\Local\Temp directory.
> >
> > These directories are never removed and slowly fill up the disk.
> > In my code I have TDOM and do a 'package require' to load which also copies the tdomxx.dll into the temporary directory.
> >
> > I tried overriding the load command to use a single private directory which worked for my dlls but not the original starkits, there is always a tclreg13.dll file.
> >
> > Does anyone know why under windows these directories are not deleted after execution ?
> >
> > In the tclWinLoad.c file there is a comment saying that this tmp directory should be set to autodelete, does anyone know why this is commented out or any other information about this system.
> >
> > On Linux it seems the tmp directory is at least emptied when the system reboots, but as modern systems are rebooted less and less this too is a problem.
> >
> > As a stopgap solution I have added the following line of code to all of our applications
> >
> > # CLEANUP any old tmp directories
> > if {$tcl_platform(platform) eq "windows"} {
> > # Process all of the TMP directories
> > foreach dir [glob -directory $::env(TEMP) -type d TCL*] {
> > # Try and remove them windows will block any current applications
> > catch {file delete -force $dir}
> > }
> > }
> >
> > Martyn
> >
OK Thanks for the link. The difference is that I do the Cleanup at the start of execution.