[runtime] Overwrite stacktrace for exception on re-throw. Fixes #1856.
[mono.git] / mcs / class / System.Runtime.Caching / ReferenceSources / SRef.cs
1 using System;
2 using System.Runtime.InteropServices;
3
4 namespace System.Runtime.Caching {
5     /*
6      * This class is used to retrieve the size of an object graph.
7      * Although Mono has not a way of computing this.
8      * Known problems:
9      *   - CacheMemoryMonitor does not trim the cache when it reaches its memory size limit.
10      *   - IMemoryCacheManager.UpdateCacheSize is called with incorrect size.
11      */
12     internal class SRef {
13
14         private Object _sizedRef;
15
16         internal SRef (Object target) {
17             _sizedRef = target;
18         }
19
20         internal long ApproximateSize {
21             get { return (long) Marshal.SizeOf (_sizedRef.GetType ()); }
22         }
23
24         internal void Dispose() {
25
26         }
27     }
28 }