program crashes about 20% of the time
#8
(12-18-2022, 01:39 AM)SMcNeill Wrote: One problem I see in the program is that there's no FREE(anything) in use.  You have multiple places where you _LOADFONT and _LOADIMAGE, but there's no place where you _FREEFONT or _FREEIMAGE.  These are going to create memory leaks where program memory usage keeps going up endlessly, and it'll eventually crash on you after it's ran long enough.

I'd suggest moving those to the start of the program, making them a shared variable, and then just loading them once at start up, so you'd never have to worry about them again. 

(I'm still looking for anything else that stands out, but I thought I'd report as I skim along in the code.)

it only loads 1 image and that is at the start of the program. it only loads it once.
Reply


Messages In This Thread
RE: program crashes about 20% of the time - by billythebull - 12-18-2022, 01:54 AM



Users browsing this thread: 8 Guest(s)