I'm dealing with big arrays, lots get dynamically created and destroyed as it is. Now i'm starting to build the processing bit of the class and want to avoid as much unnecessary slowdowns as possible.
My specific question would be: If I create a function that fetches an array by its name, would it pass on the reference to the array(desired) or create a duplicate array and give out that instead? Is there any way to control this?
Here is the code I am working with:
public function fetchArrayByName(name as string) as single()
for i = 0 to channels.count-1
if channelnames(i) = name then return channel(i)
next i
return nothing
end function