the unity editor hold the dll even if I called freeLibrary, I have to restart unity editor to reload the dll. is there a way to solve this?
No, if there were an easy solution we would have already done it. Unity does not make it easy to reload native code. We have an issue to look into it more: