Open bitleader opened 11 years ago
Bug confirmed: BASS_ChannelRemoveSync was missing the two CalbackManager calls you've pointed out.
I'll made a new release soon. In the meantime, you can simply rebuild the NativeBass jar with the fix to avoid calling CallbackManager in your code (16 is a number generated which can change from one release to another).
Using the BASS_ChannelSetSync() method add a reference to the SYNCPROC argument via the CallbackManager.addCallback(). Trying to remove it by method BASS_ChannelRemoveSync() and/or BASS_StreamFree() has no effect. The only way I can stop leaking the memory is to use the CallbackManager class explicitly.
Example: HSYNC hsync = syncMap.get(intHandle); BASS_ChannelRemoveSync(intHandle, hsync); CallbackManager.addCallback(16, null, hsync.asLong()); CallbackManager.addOwner(0, hsync.asLong());