JamesDSM50328
Technical User
I'm having an issue with the Extra! Objects not releasing from memory and causing memory conflicts. Any ideas as to why this is happening??????
Code:
'**************************************
'------ Function declaration ------
Declare function Sleep(scrn as ExtraScreen)
'----------------------------------
Sub Main()
'******* object declartions ******
Dim System As ExtraSystem
Dim Sessions As ExtraSessions
Dim Sess0 As ExtraSession
Dim Scr as ExtraScreen
Set System = CreateObject("EXTRA.System") ' Gets the system object
Set Sessions = System.Sessions
Set Sess0 = System.ActiveWindow
'changed this from ActiveSession
'to ActiveWindow this will allow
'macro toexecute in the attachmate
'window that it orginated from.
Set Scr=sess0.screen
If (System is Nothing) or (sessions is nothing) or (sess0 is nothing) Then
Msgbox "Could not create the EXTRA objects. Stopping macro playback."
STOP
End If
'.... DO stuff
'-------------------------------------------
'unbind the objects frees them from memory
set scr=nothing
set sess0=nothing
set sessions=nothing
set system=nothing
'-------------------------------------------
Exit sub
End Sub
Function sleep(scrn as ExtraScreen)
Do While scrn.OIA.XStatus <> 0
DoEvents
Loop
End function