Results 1 to 6 of 6

Thread: Exit problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2002
    Location
    Manchester,UK
    Posts
    94

    Exit problem

    I have recently started having a problem with my app.

    When I exit the app in the IDE it closes cleanly.

    When closing the compiled version I get a

    'The instruction at "blah" referenced memory at "blah". The memory could not be "written" '

    Anyone got any quick tips? I really don't know what has changed.

  2. #2
    Lively Member
    Join Date
    Jan 2002
    Posts
    108

    hmm...

    be sure that you unload all forms and references including unload me

  3. #3
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253
    I suspect you are using the 'End' function. This is not recommended and I had stop using it when I had the same problem as you.

  4. #4
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253
    'End' releases the process without releasing the resources.

  5. #5
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308
    You better go for this one.

    VB Code:
    1. Dim frm As Form
    2.     For Each frm In Forms
    3.        Unload frm
    4.        Set frm = Nothing
    5.     Next

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Apr 2002
    Location
    Manchester,UK
    Posts
    94
    I don't think it's that.

    I must admit I am below the latest service pack as I can't download it at the moment.

    I do close cleanly as far as I can see, I've certainly always tried to unload everything but who knows.

    Like I said, it only appeared the other day and the only changes I've made have been cosmetic.

    I'll try to get SP5 for VB and update whether that works or not.

    Cheers for your help.

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