ReleaseAllAdsPools

This method releases the memory used by all ADS pools loaded in memory by RTS or Verifier.

Use this feature when the project has multiple large ADS pools from different classes that require a lot of memory. If the documents are sorted by class in different batches, only the required pools for a class are loaded in memory when processing the batch. The drawback is a potential decrease in performance because the pools need to reload each time a batch processes.

Syntax

Project.ReleaseAllAdsPools()

Sample Code

The following sample code shows the implementation for RTS processing. It is placed in the Initialize event.

Private Sub ScriptModule_Initialize(ByVal ModuleName as String)
   Project.ReleaseAllAdsPools()
End Sub

The following sample code shows the implementation for Verifier and Web Verifier process. It is placed in the BatchOpen event.

Private Sub ScriptModule_BatchOpen(ByVal Username as String, ByVal BatchDatabaseID as Long, ByVal ExternalGroupID as Long, ByVal ExternalBatchID as String, ByVal TransactionID as Long, ByVal _ WorkflowType as SCBCdrPROJLib.CDRDatabaseWorkflowTypes, ByVal BatchState as Long)
   Project.ReleaseAllAdsPools()
End Sub

The scripts above provide an entry in the log similar to the following.

[Info] |20| 14:05:26.812 | 7488 | 4820400k/3448008k | 5829788k/6631068k | 195812k/200160k | 543 | 73/57 | Disconnecting ADS Pool for class: Invoices, field: VendorName