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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Objects not releasing

Status
Not open for further replies.

JamesDSM50328

Technical User
Mar 25, 2005
33
US
I am having an issue that is effecting other HLLAPI functions. After the macro below runs the objects do not release from memory and is causing a conflict with the HLLAPI macros. I cannot figure out why the objects are not releasing. Any help on this would be geatly appreciated.
Code:
 '**************************************
'------ Function declaration ------
Declare function Sleep(scrn as ExtraScreen)
'----------------------------------


Sub Main()
'******* objects ******
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
'get items from various screens
'
'-------------------------------------------
'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