danielkza Posted March 15, 2010 Posted March 15, 2010 Man, just when I think I know something about anything. So an array isn't copied, even if it's not passed ByRef, unless it's manipulated inside a function? This works anywhere, not for function parameters only IIRC. Global $a1[10000] Global $a2 = $a1 $a2 will 'point' to $a1 until you attempt to modify any of them. Only then a copy (followed by the modification) will take place.
PhilHibbs Posted March 15, 2010 Posted March 15, 2010 Kind of anyway You'll find that AutoIt uses copy-on-write optimization for arrays, so that unless the array is modified in the the function, the array never actually gets copied.Oh, cool. Well, for certain values of "cool"; it isn't called "Mad COW" in C++ circles for nothing. Another reason why AutoIt isn't going to be multi-threaded any time soon, I guess.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now