Skip to content

Commit

Permalink
Add .onUnload function.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlmelville committed Oct 20, 2018
1 parent c78071d commit 11d2829
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/hnsw.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,7 @@ get_knn <- function(X, k = 10, distance = "euclidean", include_self = TRUE,

list(idx = idx, dist = dist)
}

.onUnload <- function(libpath) {
library.dynam.unload("RcppHNSW", libpath)
}

0 comments on commit 11d2829

Please sign in to comment.