I understand how to use weak_p开发者_JAVA百科tr and shared_ptr. I understand how shared_ptr works, by counting the number of references in its object. How does weak_ptr work? I tried reading through t
This question already has answers here: Closed 10 years ago. Possible Duplicate: Why doesn't the weakref work on this bound method?
The story My server is running with 24x2 processors, and the java heap is about 70 GB. At some point after installing a new version (version-B), I saw that Full GC is taking around 30sec (stopping al
In my application I need to load large files (can beabout ~ 250 MB) into memory, I\'m doing it in a lazy way - when user ask to see a file - I\'m loading it. After that, every time user tries to acces
I have implemented an Observable class that stores a list all the observers. Should this list contain weak references to the observers for preventing memory leaks?
I have gone through the article http://developer.android.com/resources/articles/avoiding-memory-leaks.html . In this article it is suggested to use static inner class with Weak Reference .
I am looking for a weak reference implementation similar to java.lang.ref.WeakReference, but which offers a set() method or some other way of re-reference the created weak reference object. Here is th
I\'m trying to create a mutable dictionary that has weak-references for the value objects (the keys behave normally).
I\'ve recently been playing around with soft, weak and phantom reference types in Java and have been wondering if there\'s any uses out there for them that I haven\'t come across. I\'ve used them in t
Weak hash tables like Java\'s weak hash map use weak references to track the collection of unreachable keys by the garbage collector and remove bindings with that key from the collection. Weak hash ta