inm logo
Corporate Website | Contact | Store | Support | Login  

View categorized listing of all common frequently asked questions.
View our categorized library of downloads for all necessary manuals, software, etc.
 Article Options
Support Center » Knowledgebase » INM GoldenGate for Director » Director MX 2004 workaround to close the GoldenGate connection, database and any open recordsets
Support Page Banner
 Director MX 2004 workaround to close the GoldenGate connection, database and any open recordsets
GoldenGate Database Connector ServerWindows with Director MX 2004GoldenGate Installerall


The usual way of closing the GoldenGate database connection, database, and any open recordsets is to set their global instance variables to zero. However, in Director MX 2004, the global instances of variables are not destroyed properly when they are set to zero.

This becomes a problem if your application has to close and then reopen database objects at a later point, because the multiple instances of these objects will occupy the server CPU and use up memory.

If you are using GoldenGate project with Director MX 2004, on Windows, you must implement the workaround solution described below to properly close all your GoldenGate global variables.


An undocumented JavaScript method in Director MX 2004, _system.gc(), calls the JavaScript garbage collector function, which clears the global instances that are not in use (already set to 0).

Since this method is only available in JavaScript, you must create a JavaScript function that calls it. If your project is coded in Lingo, you can then call that function from within Lingo.


// JavaScript function that calls the JS system garbage collector
function callGarbageCollector() {

-- Lingo script to close a GoldenGate recordset, database and connection
on CloseDB
    gGGRecordSet = 0
    gGGDB = 0
    gGGConnection = 0
    callGarbageCollector() -- call the JavaScript function to destroy the global instance variables
end CloseDB

NOTE: If you are using GoldenGate with Director MX 2004 on Mac, you cannot use this workaround.

Article Details
Article ID: 84
Created On: 26 Sep 2006 12:24 PM

 This answer was helpful  This answer was not helpful

inm general footer
Services Xtras Go Products Support Gallery Store Download About Us Contact Newsroom