On 5/1/2011 3:53 PM, Dmitry Olshansky wrote:
Ehm.. Well, first things first: you shouldn't use classes for
lightweight & plain data things like vectors. There are structs for
that. In general, structs are value-like objects living on the stack
while classes are reference-like objects living on the heap.  Your
current code is going to allocate on GC heap new vector in every
GetColumn and I suspect also when adding two vectors.

Yes, I will change that, thank you. Btw, I'd like to mention that in addition to being allocated on the heap, classes also be 2 pointers larger because of the hidden __vptr and __monitor.

Reply via email to