Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making copy of string for avoiding Circular reference and memory leaks.
If string is `Swift.String`, holding that into `ByteOffsetCache` does not cause Circular reference, because Casting `String` to `NSString` makes new `NSString` instance. If string is native `NSString` instance, Circular reference happens on following: ``` self.utf8View = (string as String).utf8 ``` Because the reference to `NSString` is holded by every casted `String`, their Views and Indices.
- Loading branch information