I am making a snake game in C using winbgi
library. I have a problem with function settextstyle()
. Every call of function adds memory to the heap (about 50kb). I have to use this function in loop, so at some point the heap starts to overflow. Is there a way to release memory occupied by this function? Or some other way to change the size of the text in winbgi
?
while(1)
{
settextstyle(DEFAULT_FONT, HORIZ_DIR, 4)
outtext(...)
settextstyle(DEFAULT_FONT, HORIZ_DIR, 2)
outtext(...)
}