Well, as I said, only the actual reference (the pointer) is copied on return. 
Its when it returns as the right-hand side of an assignment that copying tends 
to occur.

Personally, I would just use a sequence reference. You'll have to manually 
dereference it occasionally (using the [] operator) but its the most flexible 
solution. You could also just store the sequence as part of a larger reference 
type too.

Alternatively, you could try rolling your own collection using the memory 
allocation functions and unchecked pointers.

Reply via email to