2 using System.Runtime.InteropServices;
4 namespace System.Runtime.Caching {
6 * This class is used to retrieve the size of an object graph.
7 * Although Mono has not a way of computing this.
9 * - CacheMemoryMonitor does not trim the cache when it reaches its memory size limit.
10 * - IMemoryCacheManager.UpdateCacheSize is called with incorrect size.
14 private Object _sizedRef;
16 internal SRef (Object target) {
20 internal long ApproximateSize {
21 get { return (long) Marshal.SizeOf (_sizedRef.GetType ()); }
24 internal void Dispose() {