macOS: Syntax highlighter: Free spans array
Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
@@ -150,6 +150,7 @@ class ConfTextStorage: NSTextStorage {
|
|||||||
var spans = highlight_config(backingStore.string)!
|
var spans = highlight_config(backingStore.string)!
|
||||||
evaluateExcludePrivateIPs(highlightSpans: spans)
|
evaluateExcludePrivateIPs(highlightSpans: spans)
|
||||||
|
|
||||||
|
let spansStart = spans
|
||||||
while spans.pointee.type != HighlightEnd {
|
while spans.pointee.type != HighlightEnd {
|
||||||
let span = spans.pointee
|
let span = spans.pointee
|
||||||
|
|
||||||
@@ -169,6 +170,7 @@ class ConfTextStorage: NSTextStorage {
|
|||||||
spans = spans.successor()
|
spans = spans.successor()
|
||||||
}
|
}
|
||||||
backingStore.endEditing()
|
backingStore.endEditing()
|
||||||
|
free(spansStart)
|
||||||
|
|
||||||
beginEditing()
|
beginEditing()
|
||||||
edited(.editedAttributes, range: fullTextRange, changeInLength: 0)
|
edited(.editedAttributes, range: fullTextRange, changeInLength: 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user