weak-references
Can a conforming C# compiler optimize away a local (but unused) variable if it is the only strong reference to an object?
See also these related resources: Does the .NET garbage collector perform predictive analysis of code? (on Stack Overflow)[详细]
2022-12-28 12:26 分类:问答Simple Data Caching using Weak References in WCF
Given that I have the following WCF service: class LookUpService { public List<County> GetCounties(string state)[详细]
2022-12-26 01:39 分类:问答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 destroy the object linked to via a weak reference at any time. Then what\'s[详细]
2022-12-23 06:02 分类:问答Weak reference callback is not called because of circular references
I\'m trying to write a finalizer for Python classes that have circular references. I found out that weak reference callbacks are the way to go. Unfortunately, it seems the lambda I use as a callback i[详细]
2022-12-20 12:38 分类:问答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 (In Figure 3).(No need to read through the[详细]
2022-12-20 05:46 分类:问答Suitable collection class for event listeners in Java
Related: Does java have a "LinkedConcurrentHashMap" data structure? I am looking for a collection class to hold references to event listeners.[详细]
2022-12-16 18:08 分类:问答Can/should I use WeakReference in my complex object structure with db4o?
I\'m considering to port an application to db4o. The data model consists of lots of small objects with a lot of references between each other. For example, I have a book which points to an author and[详细]
2022-12-14 16:07 分类:问答Thread Safety of WeakReference
When using a WeakReference, how can we be sure than the target is not collected between the .IsAlive and .Target calls?[详细]
2022-12-10 21:52 分类:问答Using Boost Python with Weak Ptrs?
Trying to set up a dependency in C++ with a parent-child relationship. The parent contains the child and the child has a weak pointer to the parent.[详细]
2022-12-09 16:44 分类:问答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 come across them when they were introduced. Is this something that should be routinely us[详细]
2022-12-09 13:51 分类:问答