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.

How to force deletion of a python object?

I am curious about the details of __del__ in python, when and why it should be used and what it …

python constructor garbage-collection destructor reference-counting
Reference Counting in C++ OO-Style

I came accross an intriguing implementation of a base class on the C++ FAQ that, according to my naive understanding, …

c++ reference-counting
How to go about fixing a memory leak in PHP

My PHP app has an import script that can import records. At the moment, it is importing from a CSV …

php memory-leaks reference-counting
Why no Reference Counting + Garbage Collection in C#?

I come from a C++ background and I've been working with C# for about a year. Like many others I'm …

c# garbage-collection reference-counting
How to implement thread safe reference counting in C++

How do you implement an efficient and thread safe reference counting system on X86 CPUs in the C++ programming language? …

c++ multithreading atomic reference-counting
Should I refer to self.property in the init method with ARC?

A quick question. if I have a property and an ivar declared with the same name: in the .h file: (…

objective-c ios5 initialization automatic-ref-counting reference-counting
ARC and autorelease

autorelease is used for returned function object so the caller don't take ownership and callee will release the object in …

ios objective-c memory-management automatic-ref-counting reference-counting
Is a dynamic array automatically deallocated when it goes out of scope?

in this example procedure foobar; var tab:array of integer; begin setlength(tab,10); end; is the array destroyed or the …

delphi memory-leaks reference-counting dynamic-arrays
Initializing a property, dot notation

Is it a bad idea to use the dot notation to initialize retain properties to nil in my init methods? …

objective-c initialization properties dealloc reference-counting
Simple reference counting: smart pointers

I would like to implement a simple reference counting using smart pointers. The variable pointer represents pointer to stored object, …

c++ templates smart-pointers reference-counting