Results 1 to 3 of 3

Thread: Application hangs in memory when run on Windows Server

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2009
    Location
    sydney
    Posts
    265

    Application hangs in memory when run on Windows Server

    Hi..

    i manually run my application, but automatically closes, however when i run in windows server environment it seems to hang in memory for no obvious reason.
    i tried all three method to terminate the program

    Code:
    End
    Application.Exit
    me.close
    any ideas what could be causing this behavior ?

  2. #2
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Application hangs in memory when run on Windows Server

    What your application does?
    Do you use any unmanaged resources (COM components)?
    Do you use multithreading?

    This is an overkill:
    End
    Application.Exit
    me.close
    If you have a windowed app just Me.Close() is usually enough.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2009
    Location
    sydney
    Posts
    265

    Lightbulb Re: Application hangs in memory when run on Windows Server

    i use a backGroundWorker, and i put the me.close in RunWorkerComplted method.
    Code:
     Private Sub BgWorker_RunWorkerCompleted(sender As System.Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BgWorker.RunWorkerCompleted
                           
            oVar.sqlCommand.Connection = oVar.ConRM        
    
            ' Close the SQL connection
            Call oBase.CloseSQLConnection()
       
            Me.close       
        End Sub
    I believe the problem is here. The only thing that comes to my mind is to use a timer and a boolean flag which i set to true in the above event, and timer.tick event checks the boolean and closes the program, any better suggestions ?

Tags for this Thread

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