No garbage collection takes place during native function calls, or between calls to ExecuteL() when waiting for asynchronous events.
As a side effect of memory allocation and garbage collection, the location of variables in memory may change between calls to native functions. C++ pointers and references to m values are therefore only valid during a call to ExecuteL().
If your module creates Symbian objects or allocates raw memory outside the m universe and does not tie the object or memory to an m native object value, you must ensure yourself it is properly freed when the module is destroyed (i.e. in its destructor). Closing an m process will destroy all its module instances.