-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SampleLoad leaks pinned GC handles #88
Comments
smoogipoo
changed the title
SampleLoad is very leaky
SampleLoad leaks pinned GC handles
Feb 24, 2021
Closing since PR has been merged into the codebase. Thanks @smoogipoo |
@olitee I believe this is still an issue. Unless I've missed something, the above merged PR is a workaround added to our own project, because I haven't had the time to address this in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BASS_ChannelSetSync
is documented as accepting a channel handle of typeHMUSIC
,HSTREAM
orHRECORD
.BASS_SampleLoad
returns anHSAMPLE
.ManagedBass's overload for
SampleLoad
which takes abyte[]
pins the handle then binds toChannelSetSync
and frees only when aFree
sync callback is invoked:ManagedBass/src/Bass/Shared/Bass/PInvoke/Samples.cs
Lines 461 to 464 in 0cdc873
ManagedBass/src/Bass/Shared/GCPin.cs
Lines 27 to 38 in 0cdc873
Bass.LastError
will also be set toErrors.Handle
after the call toBass.ChannelSetSync
, in confirmation of the issue. As per the above, this leaks the pinned memory handle.The text was updated successfully, but these errors were encountered: