QTP10.com is a new and completely free website that offers help in all the versions of HP QTP (including latest version 10). More importantly, it offers free code for users of HP QuickTest Professioal. This site helps you in learning the basics of QTP and descriptive/advanced programming in (QTP) on various environments like - .Net, Infragistics, Web, Windows, etc.

Note -
This blog is NOT affiliated with HP / Hewlett-Packard in any way. The data/questions come from various sources and we have our own testing questions. I am just another Software Tester like you.

QTP Tip - Explicitly destroy all objects and close all connections

Share This Post -

Sponsored Links:

Destroying objects and closing connections ensures resources are returned to the system. Objects and connections should be closed and destroyed in the opposite order in which they were created. Wait to create objects and open connections until immediately before they’re needed. Likewise, destroy objects and close connections immediately after you’re through with them.

    1. Example:
    2. Set objFso = Server.CreateObject(“Scripting.FileSystemObject”)
    3. set f = objFSO.OpenTextFile…
    4. f.Close
    5. set f = Nothing
    6. set objRS = Nothing
    7. set objConn = Nothing
    8. set objFso = Nothing