Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Allocate Variables

Hello People,

When we use the sintax:
Dim Test as Integer

than VB allocate memory space to use this variable. So, who can i disallocate a variable in VB ?

Could you help me please ?

Thanks in advance for any answer.


Comments

  • jlegjleg Member Posts: 237
    : Hello People,
    :
    : When we use the sintax:
    : Dim Test as Integer
    :
    : than VB allocate memory space to use this variable. So, who can i disallocate a variable in VB ?
    :
    : Could you help me please ?
    :
    : Thanks in advance for any answer.
    :
    :
    :
    Set Test = Nothing

    Hope this helps

    John ;-)

  • rcruzrcruz Member Posts: 3
    : Hello People,
    :
    : When we use the sintax:
    : Dim Test as Integer
    :
    : than VB allocate memory space to use this variable. So, who can i disallocate a variable in VB ?
    :
    : Could you help me please ?
    :
    : Thanks in advance for any answer.
    :

    hi,

    VB doesn't really allocate the space for the variable, just a pointer.
    Thing about it... a String variable can get 2Gb... do you really think vb allocates that much memory?!... Nope...
    If the var is not a Object just empty it (a=0;b="")(but do you really nedd it?!). But if it is a Object then you MUST set var=nothing when you don't need it anymore.

    hope this helps

Sign In or Register to comment.