Kenny Yu

Results 2 issues of Kenny Yu

I parse .m files written in Objective-C using ClangKit, when the source code is about over 300 lines, I find out that the source code is truncated and no tokens...

> 2.理解Swift值类型的写时复制 在结构体内部用一个引用类型来存储实际的数据,在不进行写入操作的普通传递过程中,都是将内部的reference的应用计数+1,在进行写入操作时,对内部的reference做一次copy操作用来存储新的数据,防止和之前的reference产生意外的数据共享。 现有这种情况: ``` class A { deinit { print("A deinited") } } struct B { let a: A var count = 1 } ``` 创建变量 var b1,然后赋值给var b2,然后对b1进行写入操作...