struct vs class vs washu

Started by
10 comments, last by Zahlman 17 years, 5 months ago
Appoligies if you took offence to something I said, err I guess the "importance" was that I was trying to put in to context why I thought using "&" or "ref" to mark out passing by reference didn't seem that bad to me, that's all [wink]. Personally I think the parameter passing in Pascal and Ada is great, but that's probably quite a personal taste!

The extra info you provided puts a better context on things, but it doesn't change that the GC is going to have a tough time clearing up that many class instances over that many struct instances.

Out of interest you run your code through CLR Profiler or similar - or are you just watching task manager for the memory usage?
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
Advertisement
This is about Java, but it's relevant. Basically (to the best of my understanding), C# uses the Java object model for classes, and the C++ one for structs (which is why the whole auto-pass-by-reference thing works the way it does; it doesn't really pass by reference, it passes *a* reference by value).

This topic is closed to new replies.

Advertisement