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

Slava Pestov 2009-07-31 19:46:18 -05:00
parent a5c4877bf6
commit dd238eaab4
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 ;