3

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?

QuantumDot
  • 19,601
  • 7
  • 45
  • 121

1 Answers1

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

ilian
  • 25,474
  • 4
  • 117
  • 186
  • "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. – Szabolcs Aug 04 '17 at 15:14
  • 1
    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. – ilian Aug 04 '17 at 15:19
  • 1
    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"? – QuantumDot Aug 08 '17 at 02:59