Results 1 to 3 of 3

Thread: MTS memory leak with an Excel instance

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Location
    Dublin, Ireland
    Posts
    2

    Question MTS memory leak with an Excel instance

    Hi All,
    I am getting a memory leak when I try to shut down an instance of Excel controlled by an MTS DLL. The code I am using seems to be pretty standard (VB 6). However when I close the Excel instance and set it equal to nothing the MTS engine does not release the memory. This may be due to the MTS settings but they are set to hold completed threads for 3 min - the Excel memory seems to be held by MTS indefinitely. This can be seen by monitoring the mtx.exe process in task manager. Every time a new Excel instance is loaded the memory usage goes up for this process, however when Excel is shutdown the memory usage does not decrease. This causes the eventual shutdown of the server.
    Anyone have a similiar problem and if so how did you manage it ?

    Many thanks
    Len

  2. #2
    Junior Member
    Join Date
    Mar 2002
    Location
    Mostar, Bosnia and Hercegovina
    Posts
    16
    How you destroy instance when you dont need it anymore?

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Location
    Dublin, Ireland
    Posts
    2
    This is the code used to save and close the instance.

    xlbkOutput.SaveAs FileName:=App.Path & "\" & xlFileName & ".xls", CreateBackup:=False

    xlApp.DisplayAlerts = False
    xlbkOutput.Close

    Set xlbkOutput = Nothing
    Set xlApp = Nothing

    Once set equal to nothing MTS should (I think) release the memory.

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