Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extra! Objects not releasing from memory

Status
Not open for further replies.

JamesDSM50328

Technical User
Mar 25, 2005
33
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top