|
-
May 23rd, 2001, 12:50 PM
#1
Erasing Arrays
I have a fixed array of objects (class I created) that I use in an Active X control. In the terminate event, I want to free the memory used by the array.
Currently, I'm using the Erase function. According to the VB help the Erase function "Sets each element to the special value Nothing." This sounds good, but what about the memory the array uses itself? Is this taken care of automatically, or should I Erase the array AND set it to nothing?
thanx/good luck,
adam
thanx/good luck
-
May 23rd, 2001, 01:28 PM
#2
Re: Erasing Arrays
I think erase should work fine. It redimensions the vector back to zero elements. If you want to make sure check that each of the elements in the array terminate or not. Let me know plz.
-
May 23rd, 2001, 01:32 PM
#3
Re: Erasing Arrays
That doesn't sound right. It's a fixed size array so it can't be redimed.
thanx/good luck,
adam
thanx/good luck
-
May 23rd, 2001, 01:44 PM
#4
Re: Erasing Arrays
Oops, should READ the problem!
Still try see if the individual elements are terminated.
Otherwise switch to a dynamic array.
-
May 23rd, 2001, 01:48 PM
#5
Re: Erasing Arrays
Thanks. I'll put a break point in the terminate event for the object and test it.
thanx/good luck,
adam
thanx/good luck
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
|