Using storage functions in C to C++ ILC
Use the following guidelines if you mix HLL storage constructs:
- If the storage was allocated using Language Environment services, free it using Language Environment services.
- If the storage was allocated using C functions such as malloc(), calloc, or realloc(), free it using free();
- If the storage was allocated using the C++ new keyword then it must be deleted with delete.
- If your program requires that storage be allocated in one language and deleted in another, use the Language Environment services.