Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Will clearing an array free the memory allocated?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-08-2009, 09:58 AM
Basic4ppc Expert
 
Join Date: May 2008
Location: Italy
Posts: 599
Awards Showcase
Beta Tester 
Total Awards: 1
Default Will clearing an array free the memory allocated?

Another quick question.

Will clearing an array free the memory allocated?

If I re-declare an array, setting it to zero, will the memory-space allocated by the array be freed as well? If it does, does this take place immediately?

The same goes for Agraham's Collection-library and using its extended methods for clearing an array: will the memory-space allocated by the array be freed as well?

I guess above depends CF.NET's memory-handling. Can anyone shed some light?

Thanks.

rgds,
moster67
Reply With Quote
  #2 (permalink)  
Old 03-08-2009, 10:04 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

You don't need to worry about freeing and reusing memory in .NET/Basic4ppc (unless you are writing libraries that interact with native resources). In managed code (C#, VB.NET, Basic4ppc) memory is entirely managed for you. Google for ".NET Garbage Collection", there are lots of articles out there but you don't actually need to know about this, just ignore the issue.
Reply With Quote
  #3 (permalink)  
Old 03-08-2009, 10:14 AM
Basic4ppc Expert
 
Join Date: May 2008
Location: Italy
Posts: 599
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Thank you Agraham.

rgds
moster67
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve free space MM2forever Questions (Windows Mobile) 7 09-17-2009 10:27 PM
Free a file used by the application? N1c0_ds Questions (Windows Mobile) 0 12-17-2008 11:06 PM
Cut and Paste & Clearing a table bish0p Questions (Windows Mobile) 7 09-02-2008 12:55 PM
Clearing combo box value mozaharul Questions (Windows Mobile) 1 03-18-2008 08:10 AM
Free Icons web site lists Cableguy Code Samples & Tips 3 07-05-2007 09:32 AM


All times are GMT. The time now is 04:02 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0