3
$\begingroup$

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?

$\endgroup$
0

1 Answer 1

3
$\begingroup$

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 means False, except when called internally for a Compile-generated DLL.

$\endgroup$
3
  • $\begingroup$ "At the moment the default setting of Automatic means False" If that were ever changed to True, it would destroy packages that came with precompiled libraries. $\endgroup$
    – Szabolcs
    Commented Aug 4, 2017 at 15:14
  • 1
    $\begingroup$ I don't think it would ever change to a global True, but as with any Automatic setting, the precise meaning could evolve a bit. $\endgroup$
    – ilian
    Commented Aug 4, 2017 at 15:19
  • 1
    $\begingroup$ Actually, I'm a bit puzzled why LibraryFunctionLoad was given this option instead of LibraryLoad. What happens if I load two different functions from the same library with LibraryFunctionLoad with separate settings to "LibraryFunctionLoad"? $\endgroup$
    – QuantumDot
    Commented Aug 8, 2017 at 2:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.