Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scope of a two dimension Dynamic array ?

Status
Not open for further replies.

bzac

Programmer
Dec 20, 2000
55
0
0
US
What is the scope of a multidimensional Dynamic array? How is it consuming the memmory? How can I kill an array ?
 
Any Dynamic array has the same scope as any other DIM in the same location. In a SUB, it goes away when the SUB is exited. If it is at Form level, it goes away when all references to the form go away, not just Unloaded. If it is at module level, it goes away when the module goes away (which may not be until end of program). If it is at Class Iinstance Level, it goes away when all references to the Instance go away. If it is Dynamic then a
ReDim arrayName(0,0)
will reduce to 1 item.
 
Thank you very much JohnYingling .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top