State caching does not consider closed/ terminated apps
ztomer opened this issue · 0 comments
ztomer commented
Hence, the cache grow to infinity.
Solutions:
a. Ignore. at most, it will grow to a few million entries after several years. Negligible considering there's Gigabytes of memory for each machine.
b. Spawn an event on each window creating, remove the cache entries on each destruction.
--> Costly?
c. GC every X calls and remove windows that are no longer in the cache. Easy and can be done later. Spiky.