|
-
May 11th, 2001, 07:35 AM
#1
Dims
Is there a way to erase all the dims you currently have to free up memory?
-
May 11th, 2001, 07:55 AM
#2
Re: Dims
It depends on how you declare it. Consider the following:
In a module:
option Explicit
dim szPermanent as string
dim szArray() as string
Function Test1() as string
dim szPermanentInFunction as string
dim szArrayInFunction() as string
' step 1:
redim szArray(10)
redim szArrayInFunction(10)
' step 2:
redim szArrayInFunction(0)
End Function
Thus,
1. szPermanent cannot be removed as it is global to the module.
2. szPermanentInFunction will be removed when you exit from function Test1()
3. Step 1 will allocate string array with 22 members (11 for each array)
4. Step 2 will free up 11 members of the string array that were allocated in Step 1
5. szArrayInFunction array will be removed when you exit from function Test1()
-Cool Bizs
Good Luck,
-Cool Bizs
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|