Am 13.09.2014 01:52, schrieb eles:
On Friday, 12 September 2014 at 20:41:53 UTC, Marco Leise wrote:
Am Fri, 12 Sep 2014 15:43:14 +0000
schrieb "Chris" <[email protected]>:
With only ARC, if two objects reference each other, they keep
each other alive indefinitely unless one of the references is a
"weak" reference, which doesn't count as a real reference
But do we need more than that? Translating the question into C++:
what use case wouldn't be covered by unique_ptr and shared_ptr?
Cycles, that is why weak_ptr also exists.
Cycles like that could happen in manual memory management, too. There is
Valgrind for that...
For those that can compile their code under GNU/Linux.
There are lots of OS where Valgrind does not run.
--
Paulo