From ab4eebaf5b76e6c655bc4f92829ef16c30a495b4 Mon Sep 17 00:00:00 2001 From: derselbst Date: Tue, 13 Apr 2021 21:06:38 +0200 Subject: [PATCH] Clarify API documentation of fluid_free() --- src/utils/fluid_sys.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/fluid_sys.c b/src/utils/fluid_sys.c index b52bd20e..d5a84529 100644 --- a/src/utils/fluid_sys.c +++ b/src/utils/fluid_sys.c @@ -279,16 +279,16 @@ error_recovery: } /** - * Convenience wrapper for free() that satisfies at least C90 requirements. + * Wrapper for free() that satisfies at least C90 requirements. * * @param ptr Pointer to memory region that should be freed * - * Especially useful when using fluidsynth with programming languages that do not - * provide malloc() and free(). - * * @note Only use this function when the API documentation explicitly says so. Otherwise use * adequate \c delete_fluid_* functions. * + * @warning Calling ::free() on memory that is advised to be freed with fluid_free() results in undefined behaviour! + * (cf.: "Potential Errors Passing CRT Objects Across DLL Boundaries" found in MS Docs) + * * @since 2.0.7 */ void fluid_free(void* ptr)