"I don't trust weak references, since the memory is only going to be
reclaimed when the GC feels pressured."
You have described SoftReferences, not WeakReferences.
WeakReference'd objects are GCable the moment they are no longer reachable via hard references (regardless of the amount of VM memory consumed), which seems to be your intended behaviour.
James
On Wed, Apr 8, 2009 at 12:55 PM, i30817
<i30817@...> wrote:
Eventually i went in other direction, since i don't (want to) control the
passed listmodel-
Instead of a index -> Image mapping i used a (list) Object -> Image mapping.
I'm using this for the indexes to be always consistent even with mutable
listmodels. I also don't control the Image getting policy. In particular it
can even be in another thread (and is in my implementation).
I don't trust weak references, since the memory is only going to be
reclaimed when the GC feels pressured. In particular i'm allocating huge
arrays somewhere else. The approach i used uses the JList natural lazy
painting to only have in memory the visible cells at the time, and the other
are disposed/need to be refetched.
This is very much more complicated, but i think it is flexible... somewhat,
for this purpose only. If you're curious how it works/looks see my newly
created blog here:
http://swingblognotthatkind.blogspot.com/
--
View this message in context: http://www.nabble.com/List-filtering-and-JList-indexes-trouble.-tp22941893p22957620.html
Sent from the GlazedLists - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail:
dev-unsubscribe@...
For additional commands, e-mail:
dev-help@...