alien.libraries: add-library should now reload the library properly, instead of just leaking DLL handles

db4
Slava Pestov 2009-07-31 19:46:18 -05:00
parent d515715b0c
commit 1993274d01
1 changed files with 3 additions and 2 deletions

View File

@ -29,5 +29,6 @@ M: library dispose dll>> [ dispose ] when* ;
: remove-library ( name -- )
libraries get delete-at* [ dispose ] [ drop ] if ;
: add-library ( name path abi -- )
<library> swap libraries get [ delete-at ] [ set-at ] 2bi ;
: add-library ( name path abi -- )
[ 2drop remove-library ]
[ <library> swap libraries get set-at ] 3bi ;