Using a Pooled Object

Using pooled COM+ objects is very similar to using normal COM objects. To acquire a pooled object you create it, as you would a non-pooled object. The operating system detects that it is a pooled object and allocates you one from the pool, rather than creating it from scratch.

When you have finished using the object you destroy it. The operating system recognizes it is a pooled object and releases it back to the pool, ready for another user to use.

You should retain the object during a transaction, and only release it when the transaction is complete. This means you generally acquire the object when data is transmitted to the host, and release it when all results have been presented to the user. You should make sure that you release all associated objects (status line, List Repository, etcetera) as they do not function as expected unless you have the LINCEnvironment object as well. Do not try to keep the current Ispec object as it is bound up with the LINCEnvironment object and does not function correctly if you release one and not the other.