Apparently, LibraryFunctionLoad
has an option "AutomaticDelete"
with default setting Automatic
. The documentation page is silent about how this works. Can I use this to clean up temporary files (as asked in this question)? How does this option work in general?
$\begingroup$
$\endgroup$
0
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
3
Making my comments into an answer,
Setting
"AutomaticDelete" -> True
will cause the DLL file to be deleted when the library is unloaded.At the moment the default setting of
Automatic
meansFalse
, except when called internally for aCompile
-generated DLL.
-
$\begingroup$ "At the moment the default setting of
Automatic
meansFalse
" If that were ever changed toTrue
, it would destroy packages that came with precompiled libraries. $\endgroup$– SzabolcsCommented Aug 4, 2017 at 15:14 -
1$\begingroup$ I don't think it would ever change to a global
True
, but as with anyAutomatic
setting, the precise meaning could evolve a bit. $\endgroup$– ilianCommented Aug 4, 2017 at 15:19 -
1$\begingroup$ Actually, I'm a bit puzzled why
LibraryFunctionLoad
was given this option instead ofLibraryLoad
. What happens if I load two different functions from the same library withLibraryFunctionLoad
with separate settings to"LibraryFunctionLoad"
? $\endgroup$ Commented Aug 8, 2017 at 2:59