Implementing encapsulation of Arc to enable third-party Trait HeapSize implementation for the Arc type
Because of use Arc in LruCache, the LruCache is not clear whether a pointer will drop the referenced
content when it is ejected from the cache, the actual memory usage is not accurate
Heap-size recorder for a class(struct)
You should use a static Var to record mem-size
and record mem-size after construction & minus it in drop() So, variable-size fields in object should NOT be modified to keep heap-size stable.
Or, you can record the initial mem-size in this object
Or, update it (not impl)