summaryrefslogtreecommitdiff
path: root/src/locations.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/locations.zig')
-rw-r--r--src/locations.zig9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/locations.zig b/src/locations.zig
index cdb228a6..40f22f85 100644
--- a/src/locations.zig
+++ b/src/locations.zig
@@ -1,4 +1,5 @@
const std = @import("std");
+const freeRaw = @import("memory.zig").freeRaw;
const pardes = @import("pardes.zig");
const look = @import("look.zig");
const syntax = @import("syntax.zig");
@@ -25,12 +26,14 @@ pub const Row = struct {
colors: []u8 = &.{},
};
+/// Raw (no safe build's overwrite): a replica's rollback copy pins a row
+/// blob and what its rows own (src/rollback.zig `pinnedDeep`).
pub fn freeRows(gpa: std.mem.Allocator, rows: []Row) void {
for (rows) |row| {
- gpa.free(row.path);
- gpa.free(row.colors);
+ freeRaw(gpa, row.path);
+ freeRaw(gpa, row.colors);
}
- gpa.free(rows);
+ freeRaw(gpa, rows);
}
/// A list of rows being built, given up: each row's own bytes, then the list.