Re:A Usable C++ Dialect That Is Safe Against Memory Corruption
by zach43 on Thursday March 15, 2018 @03:09PM
(#16595667)
Wouldn't you have a problem with reference cycles in C++ smart pointers? Not sure if they do anything special to prevent this.
[ Parent
| on HN ]
Re:A Usable C++ Dialect That Is Safe Against Memory Corruption
by nobugs on Friday March 16, 2018 @01:01AM
(#16598744)
std::unique_ptr<> won't allow you to have 'owning' reference cycles; neither 'owning' reference cycles are really necessary in real-world programs.
Re:A Usable C++ Dialect That Is Safe Against Memory Corruption
by saagarjha on Thursday March 15, 2018 @03:15PM
(#16595724)
std::weak_ptr is there for resolving reference cycles.
Re:A Usable C++ Dialect That Is Safe Against Memory Corruption
by pdpi on Thursday March 15, 2018 @08:54PM
(#16597797)
Which means you have to design around it. You can definitely run into problems with cyclical shared_ptr dependencies