rttr icon indicating copy to clipboard operation
rttr copied to clipboard

Problems with rttr::library to implement dll hot reload

Open deleoDev91 opened this issue 5 years ago • 0 comments

Hello acki-m, first of all, great work with this library, it works really well and covers lots of amazing features.

Now to the point. I'm trying to implement a dll hot reload mechanism (guess my OS), and I'm using your rttr::library class for such end. But when I'm going to unload my dlls rttr says that cant unload it because when I create the library instace, it says that the library isnt loaded(m_is_loaded=false). The wierd thing is that i call is_loaded() method and says that the library is loaded.

For this strange behavior i find 2 solutions: 1- Keep a copy of the library instance stored in an array (std::vectorrttr:library) when loading dlls, and when unloading dlls, use this copy 2- Inpecting rttr::library code i found that m_is_loaded member doesnt match is_loaded() value, so modify this code to match always (I'll try this option, cause I find the first one a dirty solution)

What do you think?

deleoDev91 avatar May 16 '20 10:05 deleoDev91