Table of Contents

Search

  1. Preface
  2. Introduction
  3. Program Design
  4. SSA-NAME3 Functions
  5. Language Specific Guidelines
  6. Controls
  7. Advanced Controls
  8. Address Standardization
  9. ASM Workbench

SSA-NAME3 API Reference Guide

SSA-NAME3 API Reference Guide

Coding the ssan3_close Call outside of the Finalize() Method

Coding the ssan3_close Call outside of the Finalize() Method

Calling the
ssan3_close
method from the
finalize()
method is not recommended. This is because it delays the call to
ssan3_close
until the Java runtime runs garbage collection on the released object, which can be anytime after the object has been released by the Java program
Instead, it is recommended that the user implement a public cleanup or close method that performs the necessary housekeeping, including a call to
ssan3_close
to release open sessions prior to releasing the object.
For example, calling
ssan3_close
from the
finally
part of a
try/catch/finally
block. Example,
static public void main (String arg[]) { nm3object w = null; try { w = new nm3object (arg); .... } catch (SomeException e) { .... } finally { if (w.h () != -1) w.close (); if (w != null) w.disconnect (); } }

Formatting Search Data and File Data strings

When formatting Search Data and File Data strings, keep in mind that the Java concatenation operator (+) does not scale well. The CPU cycles required rise exponentially as the size and quantity of strings to be concatenated increase. The concatenation operator (+) is only efficient for concatenating a small (2-3) number of short strings. When concatenating a large quantity of strings, the
StringBuffer append()
method will perform better. Once created, a single
StringBuffer
can be reused by setting the string length to
0
with the
setLength(0)
method.

0 COMMENTS

We’d like to hear from you!