Loosing FPS after refactor (memory leak?)

After the refactoring my frame rate drops consistently. I’ll start at 60 and after a few seconds they’ll start dropping. I didn’t notice this for a few lessons and tracked the change down to the refactor. There were so many changes I don’t have any idea where to start or even how to debug that.

I hope that helps anyone who is willing to look.

1 Like

I’m not looking but I will give a pointer or two.

You will run into bugs like these more as you continue. In any case, the more changes you make without testing, the harder it can be to narrow down.

In this case, you can just revert different pieces of your refactoring until the problem goes away. Once it goes away, in the pieces where you reverted, is where the problem be. So revert a bunch, then once found, revert one by one as you can depending on what the code does.

If you find it to be too aggravating, annoying, not worth doing, etc and not solve it then you will not do so well with programming as it will definitely happen more. That is realistic.

2 Likes

Awesome job! This really shows the reality of programming! Students will find a lot of value out of this post!

I suppose lol.

My personal favorite annoyances are the rare problems introduced by the coding application and there’s no real problem with the project other than having to clean it or untick a setting that was checked by default on a new update. Yes, how do you know that one of the many settings was checked and why would you think it? :rofl:

1 Like

Exactly you will never know. I’ve spent hours thinking it was my code when it was just a parameter I needed to tick off :sweat_smile:

@QueueButton thanks for the advise. I really liked "If you find it to be too aggravating, annoying, not worth doing, etc and not solve it then you will not do so well with programming " I’ll go back and see what I can do.

I’m mostly a beginner, but as we work along its starting to click. Definitely pushing and learning in bounds right now.

I really hope its not something simple, like a setting or version difference. Going back over the refraction is probably good practice anyway. I’ll update when fixed.

Fixed it!!!

It ended up being a snippet of code that i left in from the refractor.

Now I have to find out why my tank isn’t moving.

1 Like

Nice job! :clap:

Privacy & Terms