CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2000
    Location
    South Africa
    Posts
    195

    Unloading of Forms in memory

    I'm writing an application in Access 2000 and am in the testing phase. Now what happens while testing - if I do not exit the application properly, many of the forms still stay in memory.
    How can I unload them unconditionally - just for this test phase?

    thanks



  2. #2
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Unloading of Forms in memory

    I do not have access 2000 so this may not work, but you can have a try:

    Find a point in your program where you're sure you will pass before quitting.
    Insert this code:
    dim frmF as form
    for each frmF in Forms
    if frmF.name<>me.name
    unload frmF
    set frmF =nothing
    next
    Unload me





    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris
    and all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

    The Rater
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

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

Featured