
On July 28, 2014 5:13:00 PM EDT, Antony Polukhin <antoshkka@gmail.com> wrote:
2014-07-28 21:46 GMT+04:00 Renato Forti <rtforti@gmail.com>:
* how about adding an additional template parameter to the get_symbol method:
template <typename ReturnType, typename T> ReturnType* get_symbol(const symbol_type<T> &sb);
Now ((pluginapi_create)sl("create_my_plugin")) will look slightly better:
sl.get_symbol<pluginapi_create>("create_my_plugin");
+1
* what will happen with the application, if shred library goes out of scope but we continue to use symbols from it? Must it be prevented somehow by the Application library? Is it described in docs?
It would be nice if get_symbol returned a smart pointer that contained a shared_ptr to the library. When all such references are released, the library can be unloaded. ___ Rob (Sent from my portable computation engine)