When defining strings globally they are allocated exactly one time. When you create strings in functions with str_create they will be created as many times as the function is called.

I don't think it's of any interest if the engine frees them before exiting or if the memory gets freed when the process is being killed by the operating system. In fact it's memory that was allocated and still cannot be used. Also note that the number of engine objects is limited. So not freeing strings when creating them in a function is a rather bad idea, regardless if that counts technically as a memory leak or not.


Always learn from history, to be sure you make the same mistakes again...