What's the best way to pass big data into C# functions? -
basically, have large byte[]
, class of helper functions.
am right in thinking if call helpers.helperfunc(mybigbytearray)
, mybigbytearray
duplicated in memory?
if so, what's best way give big variable function (pointers making helper functions unsafe
wise? garbage collector still work?)
arrays, other objects in c#, passed reference, no data inside array duplicated; function pass array have reference original array.
from arrays objects (c# programming guide)
in c#, arrays objects, , not addressable regions of contiguous memory in c , c++. system.array abstract base type of array types.
and passing arrays arguments (c# programming guide)
arrays can passed arguments method parameters. because arrays reference types, method can change value of elements.
Comments
Post a Comment