-/** @brief like free
- @hideinitializer */
-#define xbt_free free /*nothing specific to do here. A poor valgrind replacement?*/
-/*#define xbt_free_fct free * replacement with the guareenty of being a function FIXME:KILLME*/
-
-/** @brief like calloc, but xbt_die() on error and don't memset to 0
- @hideinitializer */
+
+/** @brief like free */
+#define xbt_free(p) free(p) /*nothing specific to do here. A poor valgrind replacement? */
+
+#ifdef __cplusplus
+#define XBT_FREE_NOEXCEPT noexcept(noexcept(::free))
+#else
+#define XBT_FREE_NOEXCEPT
+#endif
+
+/** @brief like free, but you can be sure that it is a function */
+XBT_PUBLIC void xbt_free_f(void* p) XBT_FREE_NOEXCEPT;
+/** @brief should be given a pointer to pointer, and frees the second one */
+XBT_PUBLIC void xbt_free_ref(void* d) XBT_FREE_NOEXCEPT;
+
+SG_END_DECL
+