Export (0) Print
Expand All
COM
id
in
int
odl
out
ptr
ref
Expand Minimize
This topic has not yet been rated - Rate this topic

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

arrays
Arrays and Pointers
Array and Sized-Pointer Attributes
in
midl_user_allocate
/osf
out
unique

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.