Main Site Documentation

Structs vs Classes


#1

I have a class that represent a 2D vector. Each operator overload returns a new Vector.

My question is, does the Micro Framework implement a stack?
If so, would there be a perfomance gain to allocation on the stack (as a struct) as opposed to on the heap (as a class)?
And does allocating structs on the stack still trigger a periodic garbage collection?


#2

I’ve asked this question before and got this useful answer:
http://www.tinyclr.com/forum/1/3391/#/1/msg32356