CreateObject() : clean-up ?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

CreateObject() : clean-up ?

Post by AUGE_OHR »

hi,

i use CreateObject() but there seem not o:Destroy() to clean-up :o

so how to clean-up COM Object under harbour / HMG :idea:
have fun
Jimmy
User avatar
gfilatov
Posts: 1090
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: CreateObject() : clean-up ?

Post by gfilatov »

AUGE_OHR wrote: Tue Feb 18, 2020 3:11 am hi,

i use CreateObject() but there seem not o:Destroy() to clean-up :o

so how to clean-up COM Object under harbour / HMG :idea:
Hi,

The following clean up in your code is enough :arrow:

Code: Select all

      // clean-up ActiveX
      oVerbs := NIL
      oFolder := NIL
      oShell := NIL
      WshShell := NIL
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: CreateObject() : clean-up ?

Post by AUGE_OHR »

gfilatov wrote: Tue Feb 18, 2020 7:59 am The following clean up in your code is enough :arrow:

Code: Select all

      // clean-up ActiveX
      oVerbs := NIL
      oFolder := NIL
      oShell := NIL
      WshShell := NIL
OK, thx
have fun
Jimmy
Mario Mansilla
Posts: 270
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Re: CreateObject() : clean-up ?

Post by Mario Mansilla »

Hola Gregory :
este procedimiento que mencionas se realiza automaticamente cuando usas un objeto activex desde el ide con el control Activex dentro de un form ?
Como te das cuenta que el objeto queda en memoria ?

Saludos
Mario Rafael Mansilla

Hello Gregory:
This procedure you mention is done automatically when you use an activex object from the ide with the Activex control inside a form?
How do you realize that the object remains in memory?

regards
Mario Rafael Mansilla
Post Reply