### Freeing Data

When fetching data, the encoding services allocate memory for the data structures that are returned. These services accept a structure and use rpc_sm_allocate( ) to provide additional memory needed to hold the data.

The backing store library does not know what memory has been allocated and, therefore, cannot free it. For fetch calls that are made from a server stub, this is not a problem because the memory is freed automatically when the server call terminates. For fetch calls that are made from a nonserver, the programmer is responsible for freeing the memory.

Programs that call the fetch or store routines, such as dce_db_fetch( ), outside of a server operation (for instance, if a server does some backing store initialization, or in a standalone program) must call rpc_sm_enable_allocate( ) first.

###