C
C#3y ago
barcode

Does new {} create a new object that needs to be garbage collected? [Answered]

catch(Exception ex)
{
return StatusCode(500, new { Message= ex.Message} );
}
catch(Exception ex)
{
return StatusCode(500, new { Message= ex.Message} );
}
In this code, does new create a new object or is it optimized in some way to not be garbage collected?
2 Replies
barcode
barcodeOP3y ago
thanks
Accord
Accord3y ago
✅ This post has been marked as answered!

Did you find this page helpful?