[Top][All Lists]

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

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

From: Ceresa Jean-Jacques
Subject: Re: [fluid-dev] Add free() wrapper for proper memory management
Date: Sun, 22 Sep 2019 18:59:37 +0200 (CEST)



>I am trying to use the library from C#,....

I guess you use the fluidsynth shared library, and you have a way to bind your C# code to C fluidsynth API.

In this case you could write and build a new C shared library that contains the C functions you need.

For example, let the following new C shared library source for your need:


On Windows,

1) make a new project: shared C library.

2) put the the following code in your new project



 *   The function free memory using free().


__declspec(dllexport) fluid_free( void * p)





3) build your new shared C project.

4) Than from your C# project, (4.1) call fluid_free() (the same way you call any fluidsynth API), and then (4.2) bind your new shared library (the same way you bound fluidsynth shared library).



reply via email to

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