30 Jul
2014
30 Jul
'14
11:34 a.m.
Antony Polukhin wrote:
shared_ptr<int> i; { shred_library_refcountable lib("/usr/lib/myapp/plugins/plugin.so"); i = lib.get_symbol<int>("global_int"); }
*i = 100; // OK to use
The difference is that if you store the result in a weak_ptr<int>, it will immediately expire.