martindevans / SupersonicSound

C# Wrapper For FMOD Studio
Other
29 stars 9 forks source link

#18 Use GCHandle to keep delegate in memory for callbacks #21

Closed HakanL closed 9 years ago

HakanL commented 9 years ago

Solves the issue with disposing of callbacks.

HakanL commented 9 years ago

ok I changed it to just hold a reference to the delegate without GCHandle, seems to work just as well.

HakanL commented 9 years ago

I wasn't sure if we still have to set the reference to null when we're getting the END callback type, it may not be necessary?

martindevans commented 9 years ago

It can't hurt to set the reference to null. I'll check this over and merge it shortly

martindevans commented 9 years ago

Ok I merged this in, and made a few changes myself to unify the repeated callback handling code into one place.

HakanL commented 9 years ago

Very good, thanks!