|
Boost : |
From: ÒÝÁØ Ñî (yyl_20050115_at_[hidden])
Date: 2020-07-31 21:31:45
I¡¯m still thinking about the use cases.
Code like this
If you write X like this
class X
{
public:
std::string text;
};
You can not use this rcgc_shared_ptr<X>
Only if the std::string¡¯s implementation check the underlying pointer (if equals to nullptr) within
~string() when the detors called multiple times which is not true I think.
So this solution is not universal ¨C unless everything changes accordingly.
This is no problem for a new invented language or for rebuilding a GC, but for C++ may be too radical.
Only someone knows what he¡¯s doing can use this well, and yes, I haven¡¯t give
any manual yet.
BTW, I updated the code on GitHub, and please pull and run.
BR,
Yilin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk