Top "Weak-references" questions

A weak reference is a one that makes no claim of ownership.

What is the difference between a __weak and a __block reference?

I'm reading Xcode's documentation, and here is something that puzzles me: __block typeof(self) tmpSelf = self; [self methodThatTakesABlock:^ { [tmpSelf doSomething]; }]; …

objective-c memory-management objective-c-blocks weak-references ownership
Weak reference benefits

Can someone explain the main benefits of different types of references in C#? Weak references Soft references Phantom references Strong …

c# winforms memory reference weak-references
Is it possible to create a "weak reference" in javascript?

Is there any way in javascript to create a "weak reference" to another object? Here is the wiki page describing …

javascript weak-references
Android Asyntask: Use weak reference for context to avoid device rotate screen

In Apress Pro Android 4 the author has said that: [...] context of currently running activity will no longer be valid when …

java android weak-references android-context
Java's WeakHashMap and caching: Why is it referencing the keys, not the values?

Java's WeakHashMap is often cited as being useful for caching. It seems odd though that its weak references are defined …

java caching weak-references
Generic typeof for weak self references

I am trying to figure out a way to use typeof to create a weak reference to self for use …

objective-c cocoa automatic-ref-counting objective-c-blocks weak-references
Is there a practical use for weak references?

Possible Duplicate: Weak references - how useful are they? Since weak references can be claimed by the garbage collector at …

java garbage-collection weak-references
Where does the weak self go?

I often do this, let when = DispatchTime.now() + 2.0 DispatchQueue.main.asyncAfter(deadline: when) { beep() } and in one app we often …

swift weak-references
weak or strong for IBOutlet and other

I have switched my project to ARC, and I don't understand if I have to use strong or weak for …

ios ios5 automatic-ref-counting weak-references strong-references
Why does exist WeakHashMap, but absent WeakSet?

From J. Bloch A ... source of memory leaks is listeners ... The best way to ensure that callbacks are garbage collected …

java collections garbage-collection weak-references