ONERROR handle; SET_ONERROR (handle, my_free_function, my_mem); /* do stuff which may throw */ UNSET_ONERROR (handle);
If you want my_free_function to be called even if nothing was thrown, use CALL_AND_UNSET_ONERROR instead.
Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum Sat, 23 Aug 2008 03:25:12 -0700
ONERROR handle; SET_ONERROR (handle, my_free_function, my_mem); /* do stuff which may throw */ UNSET_ONERROR (handle);
If you want my_free_function to be called even if nothing was thrown, use CALL_AND_UNSET_ONERROR instead.