TypeCode free

From EDM2
Jump to: navigation, search

This function destroys a given TypeCode by freeing all of the memory used to represent it.

Syntax

TypeCode         tc;
Environment     *env;

TypeCode_free(tc, env);

Parameters

tc (TypeCode)
The TypeCode to be freed.
env (Environment *)
A pointer to an Environment structure. The CORBA standard mandates the use of this structure as a standard way to return exception information when an error condition is detected.

Returns

rc

Remarks

The TypeCode_free function destroys a given TypeCode by freeing all of the memory used to represent it. TypeCodes obtained from the TypeCode_copy or TypeCodeNew functions should be freed using TypeCode_free. TypeCodes contained in Interface Repository objects should never be freed. Their memory is released when a _somFree method releases the Interface Repository object.

The TypeCode_free operation has no effect on TypeCode constants. TypeCode constants are static TypeCodes declared in the header file "somtcnst.h" or generated in files emitted by the SOM Compiler. Since TypeCode constants may be used interchangeably with dynamically created TypeCodes, it is not considered an error to attempt to free a TypeCode constant with the TypeCode_free function.

This function is a SOM-unique extension to the CORBA standard.

Related Information

  • TypeCodeNew
  • TypeCode_alignment
  • TypeCode_equal
  • TypeCode_kind
  • TypeCode_param_count
  • TypeCode_parameter
  • TypeCode_size
  • TypeCode_copy
  • TypeCode_print
  • TypeCode_setAlignment