Boost logo

Boost :

Subject: Re: [boost] News about proposed Boost.Application library
From: Peter Dimov (lists_at_[hidden])
Date: 2014-07-30 07:34:27


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk