Who Manages Memory?
Generally, the stubs are responsible for packaging and unpackaging data, allocating and freeing memory, and transferring the data to and from memory. In some cases, however, the application is responsible for allocating and freeing memory. The following topics discuss the factors that determine which component is responsible for memory management:
- Top-Level and Embedded Pointers
- Directional Attributes Applied to the Parameter
- Length, Size, and Directional Attributes
- Pointer Attributes Applied to the Parameter
- Combining Pointer and Directional Attributes
- MCCP Buffer Protection
- Function return values