Special considerations for UDXs that use a CPad

When a UDX uses a CPad, there are special consideration that need to be taken into account:
  • A UDX that uses a CPad must be robust enough to terminate gracefully if the CPad does not contain expected data.
  • If you have two or more UDXs that can be used in the same query, and one or more of them uses CPad, use caution to avoid symbol name overlaps with the struct and class objects that are placed in the CPad.
  • Although there is no limit to the number of objects that a CPad can hold, a CPad uses a separate pointer for each object, and each pointer adds to the amount of memory consumed by the CPad. Therefore, create only objects that you really need.
  • CPad memory is allocated from the system application memory heap. Before deploying a UDX to a production system, ensure that the amount of memory it uses, including the memory used by its CPad, is acceptable.
  • The memory in use for the CPads is freed when the transaction or transaction block that called the UDX ends. You do not have to explicitly deallocate or free memory for the CPads.
  • Register a UDX that uses a CPad as NOT FENCED. A UDX that operates in fenced mode cannot use a CPad.