Hello I've been following along. I don't know if its solved later but I think when we iterate the writes and split and clone to c string it just keeps getting more and more memory every frame. Adding temp allocator as a parameter and using free_all for the temp allocator at the end of the frame fixed this for me. Are there other ways of achieving the same?
It's correct that we are consuming more and more memory each frame. Using any allocator that we can destroy or reset each frame solves that issue indeed. I would encourage you to try setting up your own `virtual.Arena` for this with perhaps a buffer and see if you can implement it that way to see how you would handle this without just passing `context.temp_allocator`.
@@mccGoNZooo Took me a while to figure out that the file picker stops working if you clear the temp arena every frame (Imgui complains that the id for the text are empty). I will try the virtual.Arena approach once I get to the part where you move the state in a struct.
I use Neovim, yeah. The syntax highlighting comes from github.com/Tetralux/odin.vim. You can add it with whichever package manager you have and it'll work when you open `.odin` files.
Hello I've been following along. I don't know if its solved later but I think when we iterate the writes and split and clone to c string it just keeps getting more and more memory every frame. Adding temp allocator as a parameter and using free_all for the temp allocator at the end of the frame fixed this for me. Are there other ways of achieving the same?
It's correct that we are consuming more and more memory each frame. Using any allocator that we can destroy or reset each frame solves that issue indeed. I would encourage you to try setting up your own `virtual.Arena` for this with perhaps a buffer and see if you can implement it that way to see how you would handle this without just passing `context.temp_allocator`.
@@mccGoNZooo Took me a while to figure out that the file picker stops working if you clear the temp arena every frame (Imgui complains that the id for the text are empty). I will try the virtual.Arena approach once I get to the part where you move the state in a struct.
Great content! Are you using neovim? Wondering how you got syntax highlighting.
I use Neovim, yeah. The syntax highlighting comes from github.com/Tetralux/odin.vim. You can add it with whichever package manager you have and it'll work when you open `.odin` files.