Results 1 to 4 of 4

Thread: Array

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 1999
    Location
    Montreal
    Posts
    59
    Anyone know's how do i unload all the array Menu i have made ?

    do i have to make a Loop to unload all Array Menu ?

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Here's how you kill a variable array;
    Code:
    Erase VarArray   ' Each element set to Empty.

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 1999
    Location
    Montreal
    Posts
    59
    this is what i did but doens't work !

    Sub UnloadAllArray()
    For b = 0 To mnuemail().Count - 1
    Erase mnuemail(b)
    Next
    End Sub

  4. #4
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Thumbs up

    But if you use the Erase syntax, you need to know the following 2 things:

    If the Array is Fixed size, then the Erase will only reinitialize the Array but not release the memory.

    Else the Array is a dynamic array then the entire memory is release.

    Code:
    Dim MyArray1 (10) As String
    Dim MyArray2 () As String
    
    ReDim MyArray2(10)
    
    Erase MyArray1 'Memory hold by the MyArray1 is not released.
    Erase MyArray2 'Memory hold by the MyArray2 is relesed

    Cheers!

    [Edited by Chris on 01-04-2001 at 11:25 PM]

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