diff options
author | San Jacobs | 2023-05-21 03:18:40 +0200 |
---|---|---|
committer | San Jacobs | 2023-05-21 03:18:40 +0200 |
commit | 734465ae9ad399c463b929195d5a738f540b8fe8 (patch) | |
tree | b2e4f23854d4432f345027f5e6652cdf0c446047 /src | |
parent | 50cbd81c340f53dfbefb6cd7df1afa2d55e15cb9 (diff) | |
download | satscalc-734465ae9ad399c463b929195d5a738f540b8fe8.tar.gz satscalc-734465ae9ad399c463b929195d5a738f540b8fe8.tar.bz2 satscalc-734465ae9ad399c463b929195d5a738f540b8fe8.zip |
Patched memory leak
Diffstat (limited to 'src')
-rw-r--r-- | src/main.odin | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.odin b/src/main.odin index e7559ea..03b95cd 100644 --- a/src/main.odin +++ b/src/main.odin @@ -89,8 +89,13 @@ main :: proc() { DAY_HEIGHT*i32(i+1)-4, width-170, DAY_HEIGHT-1, BLUE) } + // TODO: This is bad, figure out how to overwrite the existing memory instead + // of doing these horrible repeated allocations and deallocations call_text = strings.clone_to_cstring(clockprint(day.call)) + defer delete(call_text) wrap_text = strings.clone_to_cstring(clockprint(day.wrap)) + defer delete(wrap_text) + text_height = math.round(f32(i+1)*DAY_HEIGHT+(DAY_HEIGHT-font_size)*0.25) DrawTextEx(font, call_text, {20, text_height}, font_size, 0, RAYWHITE); |