diff options
Diffstat (limited to 'src/File.zig')
| -rw-r--r-- | src/File.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/File.zig b/src/File.zig index 7acf8dd6..1199e2fb 100644 --- a/src/File.zig +++ b/src/File.zig @@ -46,7 +46,7 @@ pub const Snapshot = struct { saved_len: ?usize = null, fn deinit(s: Snapshot, gpa: std.mem.Allocator) void { - pardes.memory.freeUnfilled(gpa, s.content); + pardes.memory.freeRaw(gpa, s.content); } }; @@ -818,7 +818,7 @@ pub fn deinit(p: *Pardes, pane: *Pane, file: *State) void { p.gpa.free(file.path); // Raw, as every text is freed (a replica's rollback copy pins them, // src/rollback.zig, and a safe build's free writes over what it frees). - if (ntwins == 0) pardes.memory.freeUnfilled(p.gpa, file.content); + if (ntwins == 0) pardes.memory.freeRaw(p.gpa, file.content); if (file.listing) |listing| p.gpa.free(listing.names); if (file.mini) |*mini| mini.deinit(p.gpa); if (file.line_starts.len > 0 and !index_shared) pardes.memory.freeRaw(p.gpa, file.line_starts); @@ -915,7 +915,7 @@ pub fn setContentSpan(p: *Pardes, f: *State, new: []u8, span_in: ?Span) void { } // Raw: `free` overwrites a safe build's freed memory, a whole file's // worth per keystroke; and its digest word goes (src/walk.zig). - pardes.memory.freeUnfilled(p.gpa, f.content); + pardes.memory.freeRaw(p.gpa, f.content); f.content = new; f.revision +%= 1; f.splice = .{ .revision = f.revision, .head = known.head, .tail = known.tail, .old_len = old_len }; |
