aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2026-02-16 09:33:14 +1100
committerGitHub <noreply@github.com>2026-02-16 09:33:14 +1100
commit03d30e42204a49e587f03852cf24a4ea4dfc74c6 (patch)
tree27e0f94ee87252d596ec47df61064b89cb53a047 /src
parentffb2796a8d7a8ec485dcd692949e5e1b94e6d359 (diff)
parent30b507e13ead185fa58e0a00e2181d268ee4a0ca (diff)
Merge pull request #1307 from BradLewis/fix/memory-issues-windowsHEADnightlymaster
Use context allocator instead of temp allocator for document fullpaths on windows
Diffstat (limited to 'src')
-rw-r--r--src/server/documents.odin8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/documents.odin b/src/server/documents.odin
index 3ac0263..b08f223 100644
--- a/src/server/documents.odin
+++ b/src/server/documents.odin
@@ -168,10 +168,10 @@ document_setup :: proc(document: ^Document) {
if forward == "" {
document.package_name = package_name
} else {
- document.package_name = strings.clone(forward)
+ document.package_name = strings.clone(forward, context.allocator)
}
} else {
- document.package_name = path.dir(document.uri.path)
+ document.package_name = path.dir(document.uri.path, context.allocator)
}
when ODIN_OS == .Windows {
@@ -179,9 +179,9 @@ document_setup :: proc(document: ^Document) {
fullpath: string
if correct == "" {
//This is basically here to handle the tests where the physical file doesn't actual exist.
- document.fullpath, _ = filepath.replace_path_separators(document.uri.path, '/', context.temp_allocator)
+ document.fullpath, _ = filepath.replace_path_separators(document.uri.path, '/', context.allocator)
} else {
- document.fullpath, _ = filepath.replace_path_separators(correct, '/', context.temp_allocator)
+ document.fullpath, _ = filepath.replace_path_separators(correct, '/', context.allocator)
}
} else {
document.fullpath = document.uri.path