Temporary file created by TC not removed when TC is closed

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Temporary file created by TC not removed when TC is closed

Post by *petermad »

If I open the Help from TC (F1) two unique temporary files are created in the %TEMP% directory.

When I close the Help, both of those files are deleted. But if I close TC while the Help is still open, then only one of the temporary files is deleted (and later opening and closing the Help does not remove the leftover file either).

This behavior occurs the fist time in TC 9.0 beta 1.

Not a big deal, but it contributes to filling up the %TEMP% directory with useless files.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
tcOne
Junior Member
Junior Member
Posts: 28
Joined: 2016-05-13, 00:33 UTC

Re: Temporary file created by TC not removed when TC is closed

Post by *tcOne »

Hello,

This behavior is due to how Windows' help system works. If you were to manually open a CHM file, any CHM file, either from TC or from Windows Explorer (or any file manager for that matter) you'll notice that two temp files are created in %TEMP% and are deleted when you close the file.
It kinda sounds more like a bug in the specific Windows' help system.

Regards
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Temporary file created by TC not removed when TC is closed

Post by *Usher »

tcOne wrote: 2021-11-20, 11:33 UTC It kinda sounds more like a bug in the specific Windows' help system.
It's a problem not only with HTML Help support, it's a problem with tools used to create this program.

~DF????.TMP files (where 0x???? is a random hex number) are created by some MSVC runtime libs (7.0?) and possibly by some MSVC .net Framework libs (2.0?). There is at least one file with 16 KiB size created. It is locked when the program runs and deleted on normal program exit. It may stay undeleted when the program crashes or when you kill the program process.

It looks like TC either uses wrong way to close HTML Help or doesn't wait long enough when closing the Help on exit. I didn't check the problem more extensively, so I may be wrong.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
vdijken
Member
Member
Posts: 181
Joined: 2016-07-30, 14:07 UTC
Location: The Netherlands

Re: Temporary file created by TC not removed when TC is closed

Post by *vdijken »

There are more programs who leave temporary files there; I use a disk cleaner to remove all from time to time. When the necessity is there maybe you put a cleaner in your tasks list or just a batch file who removes all files in TEMP. The schedule is up to you.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Temporary file created by TC not removed when TC is closed

Post by *petermad »

2Usher
It looks like TC either uses wrong way to close HTML Help or doesn't wait long enough when closing the Help on exit.
That's what I think to - especially because TC 8.00 - 8,52a does delete both files on exiting TC without closing the help first - so some routine regarding this seems to have been changed after TC 8.52a
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply