Results 1 to 1 of 1

Thread: Server.CreateObject("MyProject.MyClass") not letting go?

  1. #1

    Thread Starter
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Server.CreateObject("MyProject.MyClass") not letting go?

    Hi,

    I am getting ready to develop an ActiveX DLL that will be called from an ASP page. So far I made a super-simple object that basically just uses the Response Object. Problem is, the object never gets destroyed, and the ASP code sometimes barfs if I try setting it = Nothing...

    Am I missing something?

    ASP File:
    VB Code:
    1. <% @ Language = VBscript %>
    2. <% option explicit %>
    3.  
    4. <%
    5.     Dim objCGI
    6.     '
    7.     Set objCGI = Server.CreateObject("CGI_Test.clsCGI_Test")
    8.     objCGI.ServerResponse(Response)
    9.     Set objCGI = Nothing
    10. %>

    Class File (6-Global MultiUse):
    VB Code:
    1. Option Explicit
    2. '
    3.  
    4. Public Sub ServerResponse(Response As Object)
    5.     Response.Write ("<html><body><h1>Hello world !</h1></body></html>")
    6. End Sub

    Here is the output which looks fine...
    Attached Images Attached Images  
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width