Imported Upstream version 4.0.1.34

Former-commit-id: 7cbb4dcca51973689b8ece97588cddda2e4d01bb
This commit is contained in:
Xamarin Public Jenkins
2015-05-15 05:29:36 -04:00
parent 2e0d90627e
commit 50adc63821
36 changed files with 41 additions and 70 deletions

View File

@ -11,14 +11,17 @@ namespace System.Runtime.Caching {
*/
internal class SRef {
private Object _sizedRef;
// private Object _sizedRef;
internal SRef (Object target) {
_sizedRef = target;
// _sizedRef = target;
}
internal long ApproximateSize {
get { return (long) Marshal.SizeOf (_sizedRef.GetType ()); }
get {
// TODO: .net uses System.SizedReference which contains approximate size after Gen 2 collection
return 16;
}
}
internal void Dispose() {