the "Erase" procedure

Results 1 to 2 of 2

Thread: the "Erase" procedure

  1. #1
    Join Date
    Dec 1969

    Default the "Erase" procedure

    I recently discovered the &#039erase&#039 sub that removes an entire array from memory. Now, i&#039ve seen a lot of example code with a lot of arrays, but no-one ever uses this sub. Why? is my question. It seems like a good function, after all, it frees the memory-space allocated to the array.<BR><BR>Should i, or should i not use &#039Erase&#039 when i&#039m done using (big) arrays?

  2. #2
    Steve Cimino Guest

    Default Good question

    Good question. So my response is: Why not use it? I&#039ve used it time to time when I&#039ve needed the array to get entirely new information, but not when I&#039m done using it. Why? Because the majority of my variables are in local procedures. Since I don&#039t declare the procedures as "Static", the array wilts and dies as soon as the sub/function is done.<BR><BR>In ASP, when your page is finished loading, the array is zapped again. Arrays are different than objects, so don&#039t get the two terms confused.<BR><BR>But, if you&#039re concerened about memory space, by all means, use it to your hearts content. But just like we don&#039t set each string to empty or "" when we&#039re done using it, your idea may not catch on.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts