public override long GetRowValue(long row)
        {
            if (m_Table.GetObjectStatic(row))
            {
                return(0);
            }
            var obj = m_Table.GetObjectData(row).displayObject;

            switch (obj.dataType)
            {
            case ObjectDataType.Object:
            case ObjectDataType.BoxedValue:
            case ObjectDataType.Array:
            case ObjectDataType.Value:
                return(m_Table.Snapshot.typeDescriptions.size[obj.managedTypeIndex]);

            case ObjectDataType.ReferenceArray:
            case ObjectDataType.ReferenceObject:
                return(m_Table.Snapshot.virtualMachineInformation.pointerSize);

            case ObjectDataType.Type:
                return(m_Table.Snapshot.typeDescriptions.size[obj.managedTypeIndex]);

            case ObjectDataType.NativeObject:
                return((long)m_Table.Snapshot.nativeObjects.size[obj.nativeObjectIndex]);

            case ObjectDataType.NativeObjectReference:
                return(0);

            default:
                return(0);
            }
        }
示例#2
0
        public override long GetRowValue(long row)
        {
            var obj = m_Table.GetObjectData(row).displayObject;

            switch (obj.dataType)
            {
            case ObjectDataType.Value:
                if (m_Table.GetObjectStatic(row))
                {
                    return(m_Table.Snapshot.typeDescriptions.size[obj.managedTypeIndex]);
                }
                return(0);

            case ObjectDataType.ReferenceArray:
            case ObjectDataType.ReferenceObject:
            {
                var ptr = obj.GetReferencePointer();
                if (ptr == 0)
                {
                    return(0);
                }

                return(obj.GetManagedObject(m_Table.Snapshot).Size);
            }

            case ObjectDataType.NativeObject:
                return(0);

            case ObjectDataType.NativeObjectReference:
                return((long)m_Table.Snapshot.nativeObjects.size[obj.nativeObjectIndex]);

            default:
                return(0);
            }
        }
        public override long GetRowValue(long row)
        {
            var obj = m_Table.GetObjectData(row).displayObject;

            switch (obj.dataType)
            {
            case ObjectDataType.Value:
                if (m_Table.GetObjectStatic(row))
                {
                    return(m_Table.Snapshot.typeDescriptions.size[obj.managedTypeIndex]);
                }
                return(0);

            case ObjectDataType.ReferenceArray:
            case ObjectDataType.ReferenceObject:
            {
                var ptr = obj.GetReferencePointer();
                if (ptr == 0)
                {
                    return(0);
                }
                ManagedObjectInfo moi;
                if (m_Table.CrawledData.ManagedObjectByAddress.TryGetValue(ptr, out moi))
                {
                    return(moi.Size);
                }
                else
                {
                    UnityEngine.Debug.LogWarning("Managed object at address '" + obj.hostManagedObjectPtr + "' not found");
                    return(0);
                }
            }

            case ObjectDataType.NativeObject:
                return(0);

            case ObjectDataType.NativeObjectReference:
                return((long)m_Table.Snapshot.nativeObjects.size[obj.nativeObjectIndex]);

            default:
                return(0);
            }
        }
        public override bool GetRowValue(long row)
        {
            var b = m_Table.GetObjectStatic(row);

            return(b);
        }