Open
Description
We don't know the size of an array returned from native code. There's nothing we can do except let users deal with it if they know that size. @tritao suggests we use a special class called CArray which is constructed with a single pointer and has a convenient method which takes a size and returns an iterator based on it.
There are two ways we can use this CArray:
- Only use it for returned arrays and for arrays in parameters of virtual methods - use regular C# arrays in the remaining case of parameters used by non-virtual functions;
- Use CArray in all cases.
The first way has the advantage of providing a simpler API users are familiar with. The second way has the advantage of consistency. We have so far put the decision off until the time comes to implement this.