[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[fluid-dev] Add free() wrapper for proper memory management

From: Pieter-Jan Briers
Subject: [fluid-dev] Add free() wrapper for proper memory management
Date: Sun, 22 Sep 2019 16:16:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0


The documentation for fluid_settings_dupstr() says to use free() to free the string given by the function. I am trying to use the library from C#, and while .NET does have equivalents to malloc/free, there is no guarantee this matches the free() used by Fluidsynth. (At least with Linux CoreCLR it seems to, but especially on Windows this can easily get murky)

The result is that I am basically forced to leak the string given to me by fluid_settings_dupstr(), since I cannot correctly call free() as used by Fluidsynth.

Would it be possible to provide something along the lines of fluid_free(), which would simply be a wrapper to free()?

Thank you,

Pieter-Jan Briers

reply via email to

[Prev in Thread] Current Thread [Next in Thread]