Re: [Flashcoders] pointers, references and just straight up values

2008-11-30 Thread Juan Pablo Califano
Hi Anthony, I wouldn't say AS 3 is partially managed (memory-wise). You don't have to release / free memory yourself. The garbage collector takes care of that, when an object no longer has valid references pointing to it. That doesn't mean that as soon as an object is unreachable, it' s disposed;

Re: [Flashcoders] pointers, references and just straight up values

2008-11-29 Thread Anthony Pace
That is absolutely the best explanation I have had so far. So as3 is only a partially managed language? For example, if I was to pass the reference to a bitmap object as an argument to a function, it has to be dereferenced in the function by instantiating a new variable, and that new variable

Re: [Flashcoders] pointers, references and just straight up values

2008-11-29 Thread Juan Pablo Califano
Well, in AS you don't have pointers (in the sense of C pointers). Except for primitives, which are basically Number, int, uint, Boolean, and String, everything else is a reference to an object allocated on the heap. References in AS behave pretty much like references in Java; and probably you coul

Re: [Flashcoders] pointers, references and just straight up values

2008-11-29 Thread Eduardo Omine
That's correct... AFAIK only primitive types (Strings, Boolean, Numbers, uints and ints) are passed as values. All other types are passed as references. -- Eduardo Omine http://blog.omine.net/ http://www.omine.net/ ___ Flashcoders mailing list Flashcode

Re: [Flashcoders] pointers, references and just straight up values

2008-11-29 Thread Anthony Pace
for instance... if you modify the object that was passed as an argument in the function you have modified the object in the display list; yet, I can understand this, as without this passing around and duplicating a Bitmap object as it is passed to a function would be very costly with regard to

[Flashcoders] pointers, references and just straight up values

2008-11-29 Thread Anthony Pace
Is there a list of what is referred to as a pointer for the AS3 spec, and what when a value is just duplicated? This would be useful to have. Took me a few moments to realize that most(if not all) objects on the display list are actually pointed to when passing a reference to them as a argume