Top "Weak-references" questions

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

WeakReference understanding

I want to create the dictionary of all the ViewModels. public static Dictionary<string, WeakReference> vmCollection = new Dictionary&…

c# wpf weak-references
Weak NSString variable is not nil after setting the only strong reference to nil

I have a problem with this code : __strong NSString *yourString = @"Your String"; __weak NSString *myString = yourString; yourString = nil; __unsafe_unretained …

objective-c memory-management nsstring automatic-ref-counting weak-references
Is Josh Smith's implementation of the RelayCommand flawed?

Consider the reference Josh Smith' article WPF Apps With The Model-View-ViewModel Design Pattern, specifically the example implementation of a RelayCommand (…

wpf mvvm weak-references icommand relaycommand
Understanding ConditionalWeakTable

I am trying to understand ConditionalWeakTable. What is the difference between class ClassA { static readonly ConditionalWeakTable<ClassA, OtherClass> …

.net dictionary weak-references
ConcurrentHashMap with weak keys and identity hash?

How do I get a ConcurrentHashMap with weak keys and identity hashes in Java? I think Google Guava Collections can …

java concurrency weak-references concurrenthashmap
Collections of zeroing weak references under ARC

How can I get an array of zeroing weak references under ARC? I don't want the array to retain the …

objective-c cocoa-touch cocoa automatic-ref-counting weak-references
Weak object in an NSDictionary?

I would like to store a zeroing weak reference to an object in a NSDictionary. This is for a reference …

ios nsdictionary automatic-ref-counting weak-references
Why do we need weak reference in java

I understand that weak references are at the mercy of the garbage collector, and we cannot guarantee that the weak …

java weak-references
ThreadLocal Resource Leak and WeakReference

My limited understanding of ThreadLocal is that it has resource leak issues. I gather this problem can be remedied through …

java thread-local weak-references
Swift Closures - Capturing self as weak

I am trying to resolve a closure based strong reference cycle in Swift. In the code below, object is retained …

swift closures weak-references