sizeOfCollection

fun sizeOfCollection(collection: Collection<*>?): Long

Returns the size in bytes of a Collection object, including sizes of its values, supplying .UNKNOWN_DEFAULT_RAM_BYTES_USED when object type is not well known. This method recurses up to .MAX_DEPTH.


fun sizeOfCollection(collection: Collection<*>?, defSize: Long): Long

Returns the size in bytes of a Collection object, including sizes of its values, supplying default object size when object type is not well known. This method recurses up to .MAX_DEPTH.