Method ShallowSizeOf
ShallowSizeOf(Object)
Estimates a "shallow" memory usage of the given object. For arrays, this will be the memory taken by array storage (no subreferences will be followed). For objects, this will be the memory taken by the fields.
.NET object alignments are also applied.
Declaration
public static long ShallowSizeOf(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Int64 |