Top "Reference-counting" questions

Reference counting is a mechanism whereby a computer language keeps track of when you create and then no longer need an object or data structure, in order to free unneeded memory.

What are the advantages and disadvantages of using ARC?

What are the advantages and disadvantages of using the new automatic reference counting (ARC) memory management style in an iOS …

iphone ios ios5 automatic-ref-counting reference-counting
What is a reference cycle in python?

I have looked in the official documentation for python, but i cannot seem to find what a reference cycle is. …

python garbage-collection reference-counting cyclic-reference
Handling duplicates keys within an AVL tree

I want to make my avl-tree support duplicate keys but there is a problem with the default behavior of the …

binary-tree binary-search-tree avl-tree reference-counting
What solutions are there for circular references?

When using reference counting, what are possible solutions/techniques to deal with circular references? The most well-known solution is using …

reference-counting circular-reference
C++: Multi threading and reference counting

Currently ive got some reference counted classes using the following: class RefCounted { public: void IncRef() { ++refCnt; } void DecRef() { if(!--refCnt)…

c++ multithreading reference-counting
Atomic Reference Counting

I'm trying to understand exactly how thread-safe, atomic reference counting works, for example as with std::shared_ptr. I mean, …

c++ multithreading c++11 atomic reference-counting
Is cv::Mat thread-safe (atomic assignment + refcounting)?

I'm attempting to share an image, that is only being used read-only, across threads. Typically I do this sort of …

opencv thread-safety atomic reference-counting
How to detect cycles when using shared_ptr

shared_ptr is a reference counting smart pointer in the Boost library. The problem with reference counting is that it …

c++ garbage-collection shared-ptr reference-counting
Why should Py_INCREF(Py_None) be required before returning Py_None in C?

Why should Py_INCREF(Py_None) be required before returning Py_None in C as follows? Py_INCREF(Py_None); …

python c reference-counting
What is the best way to implement smart pointers in C++?

I've been evaluating various smart pointer implementations (wow, there are a LOT out there) and it seems to me that …

c++ smart-pointers c++03 raii reference-counting