Top "Weak-references" questions

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

When should weak references be used?

I recently came across a piece of Java code with WeakReferences - I had never seen them deployed although I'd …

c# java weak-references
Is this Runnable safe from memory leak?

I am a total beginner in Java and have created a simple Java Android snippet where in a Runnable after 1,5 …

java android memory-leaks runnable weak-references
Objective-C - weak property - getter autoreleases (Automatic Reference Counting)

I have a doubt regarding weak property in ARC (auto reference counting) My understanding (correct me if I am wrong): …

objective-c automatic-ref-counting getter autorelease weak-references
Weak events in .NET?

If object A listens to an event from object B, object B will keep object A alive. Is there a …

.net events garbage-collection weak-references
How to avoid memory leaks in callback?

Effective Java says: A third common source of memory leaks is listeners and other callbacks. If you implement an API …

java memory-management callback weak-references
IBOutlet and viewDidUnload under ARC

There is a similar question to this on SO here, however I just want to clarify something that wasn't fully …

ios weak-references iboutlet automatic-ref-counting
When to use weak references in Python?

Can anyone explain usage of weak references? The documentation doesn't explain it precisely, it just says that the GC can …

python weak-references