I would need to maintain a list of about 20000 objects of a class. This class would be a managed wrapper for a c++ one. I would like to know if a ref class or a value class is they way to go.
I was told the following for pros/cons w.r.t GC
In the case of a value class, there is a single point to garbage collect vs reference class with a pointer, where there would be 20000 objects to garbage collect. Also there is no finalizer or destructor for value class and hence these objects wont end up in the finalization queue which is single threaded.
Can someone elaborate on the functioning of the GC in both these cases for large lists of objects.