midl_user_free attribute
The midl_user_free function is provided by client and server applications to deallocate dynamically allocated memory.
void __RPC_API midl_user_free(void __RPC_FAR * p);
Parameters
- p
-
A pointer to the memory block to be freed.
Remarks
Both client application and server application must implement the midl_user_free function, unless you are compiling in OSF-compatibility (/osf) mode. The midl_user_free function must be able to free all storage allocated by midl_user_allocate.
Applications and stubs call midl_user_free when dealing with objects referenced by pointers:
- The server application should call midl_user_free to free memory allocated by the application—for example, when deleting a specified node.
- The server stub calls midl_user_free to release memory on the server after marshaling all [out] arguments, [in, out] arguments, and the return value.
Examples
#include <windows.h> void __RPC_API midl_user_free(void __RPC_FAR * p) { free(p); }
See also
Show: