Subject: Re: [boost] [Root Pointer] New Documentation
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-04-10 17:41:02
On 04/10/2016 04:07 PM, Artyom Beilis wrote:
>>> 3. What happens when root_ptr is deleted and node_ptr exists? Does use
>>> of node_ptr lead to undefined behavior? If so it should be marked as
>>> big warning.
>> You can't construct a node_ptr without a root_ptr so node_ptrs are always
>> instantiated after a root_ptr.
> I mean stuff like (pseudo-code):
> node_ptr<int> get_int()
> root_ptr<int> r=make_root()...
> node_ptr<int> p = make_node(r,...) ...
> return p;
> node_ptr<int> p = get_int()...
I just tried your code:
root_ptr<int> r = make_root<int>(9);
node_ptr<int> p = make_node<int>(r, 10);
node_ptr<int> p = get_int();
std::cout << *p << std::endl;
And it outputs:
I'll need to debug this code to see what is happening. You're the first
one to bring this up.
>> It is my own research so I have 0 reference to include.
> Than you need to really describe the algorithm very well and
> probably prove the correctness, also it isn't strictly needed.
>>> (c) Describe the algorithm in much wider manner including better
>>> examples, values of reference counters etc.
>>> (d) Provide much wider beginner tutorial with samples
>> It sounds like I am going to have write a book on the subject. Any expert
>> is welcome to help me out because if that is the case that will take me some
>> time to write down.
> See... you are submitting a library for a review that provides entirely new
> memory management model (at least you describe it like that)
> Considering there lots of research done regarding reference counting,
> GC and cycle detection and other things in computer science literature,
> and considering that you come with a new concept (even if it is
> simple/trivial one)
> than you are expected to provide something very solid.
Any help from these research centers would be much appreciated.
Otherwise we'll spend the next 50 years wondering about GC and worse,
making it part of the C++ standards (arghh!).
> If you are doing it as a part of academic research than it would be
> good to refer to relevant publications.
I am also out of the academia.
> It is just a part of the game you try to play :-)
Yeah I tend to choose difficult games, just like my astrophysics project ;/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk