Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Is this a potentional memory leak?

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an File
Check here to include your profile signature.
Check here to subscribe to this topic.
    

T O P I C    R E V I E W
2dcoder Posted - Apr 06 2005 : 3:07:19 PM
Example, I have some udt's such as:

public aaa as Type
x as integer
y as single
end type

public bbb()

Then in my main module:

redim bbb(1000) as aaa

When I exit the program do I need to release either the type (aaa) or the array which is (bbb)? And if I do, how do I release them? I tried set as nothing but it didn't work. Thanks for any help.
3   L A T E S T    R E P L I E S    (Newest First)
VBBR Posted - Apr 08 2005 : 11:05:42 AM
"Set xxx = Nothing" only works for classes (objects).
2dcoder Posted - Apr 07 2005 : 11:38:49 PM
Thanks Noi!

I'm declaring in a module, based on a var read from file. Looks like erase is the best option, thanks!
noi_max Posted - Apr 06 2005 : 4:55:19 PM
I don't think a release is necessary, but if you're concerned about memory you can always erase the array

Erase bbb

Also, how about decalring the datatype up front?

Public bbb() As aaa
ReDim bbb(1000)

VBGamer © Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.