Package org.robolectric.res.android
Class ApkAssetsCache
java.lang.Object
org.robolectric.res.android.ApkAssetsCache
A global cache for ApkAssets (framework and app resources). This cache is shared between
sandboxes to avoid having to store multiple copies of system resources for the same SDK level
(i.e. different looper, graphics modes, or instrumentation configuration).
Previously there was a per-sandbox cache for system resources, but with the resource tables growing in size, and an increasing number of sandbox parameters, the memory usage did not scale well as test suites increased in size.
Currently the items in this cache are not made available for GC. However, it would definitely be possible to have a per-sdk-level reference counting mechanism where an item could be freed if all sandboxes referencing that item are collected.
-
Nested Class Summary
-
Method Summary
-
Method Details
-
put
-
get
-