[PB 6.0 LTS] InitJoystick() leaks memory

Just starting out? Need help? Post your questions and find answers here.
flood
User
User
Posts: 32
Joined: Sun Aug 14, 2011 10:32 pm

[PB 6.0 LTS] InitJoystick() leaks memory

Post by flood »

According to the manual InitJoystick() can be called repeatedly to count the number of joysticks connected, but every time this function is called some memory is leaked.

You can test it by running the following code and looking at the task manager:

Code: Select all

Repeat
  InitJoystick()
Forever
Edit: It looks like it was caused by a driver (vjoy) not playing nicely with purebasic. I uninstalled it and the memory leak is gone. I guess this thread can be removed.

// Moved from "Bugs - Windows" to "Coding Questions" (Kiffi)
Last edited by flood on Mon Oct 24, 2022 10:23 am, edited 1 time in total.
BarryG
Addict
Addict
Posts: 4123
Joined: Thu Apr 18, 2019 8:17 am

Re: [PB 6.0 LTS] InitJoystick() leaks memory

Post by BarryG »

I don't have a joystick, so I don't know if that makes any difference, but running that code here for 1 minute resulted in an average of 1500 KB in Task Manager for that process, and it didn't go up past that. Win 10 Pro (x64).
flood
User
User
Posts: 32
Joined: Sun Aug 14, 2011 10:32 pm

Re: [PB 6.0 LTS] InitJoystick() leaks memory

Post by flood »

It looks like it was caused by a driver (vjoy) not playing nicely with purebasic. I uninstalled it and the memory leak is gone. I guess this thread can be removed.
Post Reply