contents   index   previous   next



USING SE_TEMP AND SE_WRAPPER_TEMP

 

Using these objects is pretty simple. You create a member, store some value it in it, then delete it when you are done. For SE_WRAPPER_TEMP, you often do not delete the members explictly and instead let them go away automatically when your wrapper function exits. The only problem arises in selecting which member to use. You need to ensure that you do not conflict with some other part of your program that may also be using a temporary member of these objects or with utility functions potentially written by someone else.

 

The way to do this is to choose a member name for your temporary variable that is not a simple name like foo or i. It is suggested that you use a name that incorporates the filename and wrapper function name, since that should be unique for your application. For instance, your member name might be foo.c:my_wrapper.temp1. In this way, you can ensure that your program does not mysteriously fail due to conflicting SE_TEMP member names.

 


SE_RETURN EXPLAINED