Subject: Re: bug#41242: Port feature/native-comp to Windows

From: Eli Zaretskii <[email-masked]>
Date: Thu, 14 May 2020 20:14:04 +0300

> From: Andrea Corallo <[email-masked]>
> Cc: [email-masked], [email-masked]
> Date: Thu, 14 May 2020 15:03:08 +0000
> 
> Now simply when the compilation unit object is collected, the handle is
> closed.  The compilation unit is collected when is not reachable by any
> of the functions defined into.
> 
> Loading a new compilation unit B that redefines the same functions
> defined by A does not guarantees much, some of the old definitions of A
> could be still in use somewhere, in that case A will not be collected.
> 
> So yeah I think we need a specific mechanism (kill-emacs hook as you
> suggest) to do the cleanup when Emacs goes down.

Some list of files to remove and a function to remove them at exit
should be sufficient.