ActionScript Objects: By Reference or By Value

by Kyle Hayes on August 17th, 2007

Many of the popular programming languages such as Java, C#, Visual Basic, C, C++ pass objects around in much the same manner–either by reference or by value. This is quite familiar to anyone who has a background in the above languages.

For those of you that don’t understand, it is important that you do. Here is a quick explanation. Applications store their variables inside the computer’s memory, and they can get access to those pieces of data in memory, by giving the computer an address of where that data is located. For example, if you create the string “Hello World” and save it to the variable greeting, the computer stores the value of greeting in memory and the variable itself has the address to that data.

Popular Posts

From Flex

1 Comment
  1. patrick permalink

    There is a copy() method for XML that will create and return another (separate) instance of the original XML.
    http://livedocs.adobe.com/flex/2/langref/XML.html#copy()

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS