Im reading about c# 10 and read
"A deconstructor (also called a deconstructing method) acts as an approximate opposite to a constructor: whereas a constructor typically takes a set of values (as parameters) and assigns them to fields, a deconstructor does the reverse and assigns fields back to a set of variables."
I get that this can be used to get a bunch of member values in a class, but does it do anything regarding the life cycle of the class? As in does it force all references to it to be removed and for it to be garbage collected or does it just return values?
Deconstructor unlike Destructor (c# doesn't have them at all) doesn't do anything with memory allocation; deconstructor is just a syntactic sugar, it usually assigns
outparameters and nothing more e.g.then you can put
instead of