美文网首页
handyJson引起的crash

handyJson引起的crash

作者: ablac | 来源:发表于2018-06-26 09:02 被阅读21次
var nominalTypeDescriptor: NominalTypeDescriptor? {
        let pointer = UnsafePointer<Int>(self.pointer)
        let base = pointer.advanced(by: nominalTypeDescriptorOffsetLocation)
        if base.pointee == 0 {
            // swift class created dynamically in objc-runtime didn't have valid nominalTypeDescriptor
            return nil
        }
        return NominalTypeDescriptor(pointer: relativePointer(base: base, offset: base.pointee-base.hashValue))
    }
将offset:pointee    修改为将offset:base.pointee-base.hashValue

相关文章

网友评论

      本文标题:handyJson引起的crash

      本文链接:https://www.haomeiwen.com/subject/mihpyftx.html