Guys I'm about to finish a chip8 emulator written in C++ on c4droid ( an C11++ and SDL IDE for android) So far a lot of things are working such as counters, renderer, timers and input handling, but I'm getting a strange behavior.
Once i click on compile + run the app runs at a good speed, but slows down over time. I thought I was creating too many button objects, but those are created outside the main loop i just refresh the state and redraw a fill or not filled rectangle depending on the button state. I'm also not running the debugger that goes from an SDL Surface to a Texture, but I'm freeing the created surfaces as soon as I'm done with them... As for the main rendering loop is just a 2D matrix of rectangles and i decide the color via Xoring... So far I haven't been able to pin point where the memory leaks are at... Anyone knows a good profiler for c++? Would that help me pin point the leak?
Thank you in advance guys
Once i click on compile + run the app runs at a good speed, but slows down over time. I thought I was creating too many button objects, but those are created outside the main loop i just refresh the state and redraw a fill or not filled rectangle depending on the button state. I'm also not running the debugger that goes from an SDL Surface to a Texture, but I'm freeing the created surfaces as soon as I'm done with them... As for the main rendering loop is just a 2D matrix of rectangles and i decide the color via Xoring... So far I haven't been able to pin point where the memory leaks are at... Anyone knows a good profiler for c++? Would that help me pin point the leak?
Thank you in advance guys