Hi everyone,

I just need to get something straight in my head.

Given code along the following lines:
(pseudo code)

Package
{
 Imports.....

        public class fooAudio
        {
                
        [Embed(source="some.mp3")]
        private static var someMP3 : Class;
        private static var Sound00  :  SoundAsset  =  new someMP3() as
SoundAsset;

        function fooAudio():void
        {
        }

        .... other methods etc

        }

}


Then inside my assets model which is a singleton I instantiate the class
(this being the only time the class is instantiated)

        public var assetSounds : fooAudio = new fooAudio();


What I need to understand for sure is this:

Will the Embedded source.mp3, and the sound classes  only be in memory ONCE?

Or is the data copied along into the new object?

I'm just not sure if references are being passed or a second copy of the
data (which in this case is not what I want obviously) is being copied when
the new object is created.

I hope I've made sense with this question.

Thanks

Glenn.

 
 

__________ Information from ESET Smart Security, version of virus signature
database 2880 (20080215) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 

Reply via email to