2 ms·
Strings are complex entities, I am not sure if there is a perfect way to handle them. In my case (I use my own framework) I use a lot of makeStringWith* funct
by stephc_int13 5y ago
Strings are complex entities, I am not sure if there is a perfect way to handle them.
In my case (I use my own framework) I use a lot of makeStringWith* functions that all allocate in the same global scratch buffer (one per thread) and I don't care at all about releasing the memory.
There is simply one function to clear reset all scratch buffers, it has to be called explicitely by the user, most of the time once per frame (I create video games) but it can also be when the current job is done or never.
From my perspective it is very efficient and reliable, never had to solve a bug related to this mechanism.