Adobe Dreamweaver Forums



Last 10 THreads :         cfimage error (Last Post : masoud_amen - Replies : 2 - Views : 3 )           »          Dragging components (Last Post : hsfrey - Replies : 2 - Views : 4 )           »          Is file too large? (Last Post : tweaked_eye - Replies : 0 - Views : 1 )           »          Could not find the included template (Last Post : azuro28 - Replies : 2 - Views : 3 )           »          problems linking PDFs (Last Post : Mantzi - Replies : 0 - Views : 1 )           »          flash loader reappears after movie plays (Last Post : lyshamo - Replies : 3 - Views : 4 )           »          How to turn IMAGE into MOVIECLIP??? (Last Post : Snufferson - Replies : 7 - Views : 8 )           »          Embed files in a projector (Last Post : ytlevine - Replies : 0 - Views : 1 )           »          ColdFusion = "old technology" (Last Post : Ian Skinner - Replies : 7 - Views : 8 )           »          Load dynamic text into an embeded swf (Last Post : mikeyjray - Replies : 4 - Views : 9 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 12-02-2008, 10:16 AM
nikos101
 
Posts: n/a
Diggs:
Default Whats the difference between arrayCollection = null andarrayCollection.removeAll()?

Whats the difference between arrayCollection = null and arrayCollection.removeAll()?


Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-02-2008, 11:42 AM
atta707
 
Posts: n/a
Diggs:
Default Re: Whats the difference between arrayCollection = nulland arrayCollection.removeAll()?

In arrayCollection = null; statement you're setting this reference to null and
potentially making it available for garbage collection. I say 'this reference'
and potentially because, as you may know, there might be other references to
this array collection object that won't be affected by this statement and hence
it won't be GC'ed.

arrayCollection.removeAll() says that I want to empty this array collection
for all the reference that we pointing to it. That is, remove all the objects
from the collection -- and of course make them 'potentially' available for the
GC -- the size of the array collection would be reduced down to zero and all
the references would be pointing to a valid but empty collection.

Hope this helps.

ATTA

Reply With Quote
  #3 (permalink)  
Old 12-02-2008, 03:53 PM
*gsb*
 
Posts: n/a
Diggs:
Default Re: Whats the difference between arrayCollection = nulland arrayCollection.removeAll()?

....is:
myArrayCollection.removeAll();

....the same as:
myArrayCollection = new ArrayCollection();


Reply With Quote


  #4 (permalink)  
Old 12-02-2008, 05:43 PM
atta707
 
Posts: n/a
Diggs:
Default Re: Whats the difference between arrayCollection = nulland arrayCollection.removeAll()?

only when myArrayCollection is the only reference to the underlying collection object, yes.

ATTA
Reply With Quote
  #5 (permalink)  
Old 12-05-2008, 02:33 PM
*gsb*
 
Posts: n/a
Diggs:
Default Re: Whats the difference between arrayCollection = nulland arrayCollection.removeAll()?

Aha... :light;

Yes, of course. I see. TY

Reply With Quote
Reply


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 On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 11:33 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk