Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mylyn-vex-dev] Why is StyleSheet using WeakReference for cached styles?


i'm playing with CSS properties and realized that the styles are recalculated every time the layout is refreshed. There is a caching mechanism for calculated styles, but this is using a WeakReference. Since the styles are apparently not referenced elsewhere, the cached styles are GC'ed every few seconds and have to be recalculated.

As long a i don't misunderstand the function of the cache (which is very well possible) i think strong references should be used here, and the styles should stay in the cache until StyleSheet#flushStyles is called.

Back to the top