Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating my mouse and keyboard routine.
#19
(01-27-2025, 10:18 PM)Pete Wrote: That's neat! It is something I had thought about for a demo, but I realized it's too much to code for just that purpose, alone. Now I know just how much too much was!

I did manage to piss it off a bit. I clicked the KB2 key. The keyboard color changed but then all hell broke loose in memory, going from 96MB to over 1300MB before I hit End Task to shut it down. Memory leak?

Pete

Maybe... The demo that I copied that from is about 4 or 5 years old, so there's been several changes in the language in that time. It could be that the code has always had memory issues by not freeing something it should... or it could be a change to the language... or it could just be that it doesn't like YOU. Big Grin

And you have to remember, this isn't really just a single library at work. This is my KeyHit library which gives us the extra keycodes that GLUT doesn't, on top of my Virtual Keyboard library, which is what gives the keyboards and the buttons which we can interact with. The actual code here (excluding the two libraries which are merged into this one post) is a trifling set of lines of code.

When I get a chance, I'll dig into it sometime and see where/what it's doing with regard to memory. Honestly, it should never jump to 1.3GB of mem usage! Something has to be seriously wrong there, for that to happen! Big Grin
Reply


Messages In This Thread
Updating my mouse and keyboard routine. - by Pete - 01-21-2025, 05:05 PM
RE: Updating my mouse and keyboard routine. - by SMcNeill - 01-27-2025, 10:35 PM



Users browsing this thread: 8 Guest(s)