Reputation: 4830
In Java, I recall there is a way to store objects in a usable format that may be garbage collected. It is some sort of loose reference. If they get garbage collected there is a way to detect and reload.
I'm having a hard time finding this. There is so much information about GC in general. Anyone know the name?
Upvotes: 2
Views: 100
Reputation: 3473
I think you're looking for the *Reference
classes in java.lang.ref
. The ReferenceQueue
class allows you to be notified when a reference is collected.
You might also find FinalizableReference from Google Guava useful.
Upvotes: 1