|
-
May 20th, 2012, 07:08 AM
#1
Thread Starter
PowerPoster
Freeup memory? (Array)
Hi,
I'm loading a couple of comboboxes with a few 100 items using an array. I only need them to load at the startup of the app. So because I don't need to use the array anymore I was wondering if they were still located in the memory and if so..: What would be the best way to clean it? Erase(myarray) or Array.Clear(...)
-
May 20th, 2012, 12:26 PM
#2
Re: Freeup memory? (Array)
Array.Clear just clears the values from the array elements, so if you start with a 300 element array filled with strings, after clearing you'll have a 300 element array filled with ""
erase completely erases the array. after erase your array = nothing.
but i don't think you'll be saving much memory doing that
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
May 20th, 2012, 12:41 PM
#3
Thread Starter
PowerPoster
Re: Freeup memory? (Array)
but i don't think you'll be saving much memory doing that
So I guess it's a bit pointless in my case, but thank you for telling me how it works. The msdn didn't mention that. 
Edit: after adding the erase it seems tat the app uses even more memory ...
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
|