Object allocation: reference type creation

I do not understand this warning, the following code generates a "Object Allocaton: Reference type creation" warning.

Nothing in the action allows me to clear this warning, what does it mean and what am I supposed to do with it ?

using (var hubProcess = new Process())




1 comment

Actually, it is not Warning, it is a Hint. So you do not have to do anything, I think. 

Even we are understanding what the "reference type" means, sometimes we fail at handling and changing values inside such an object. So I think Rider is showing such cases we should be aware of and be careful. 

If you are not familiar with the concept of "reference type" and that tricky part we can make a mistake, please try to google the keyword "reference type value type". 

If this hint is too noisy for you, you can disable it in several ways. Try to hit Alt+Enter on that red underline. 


Please sign in to leave a comment.