Let's suppose this very basic C# code:
var tab = new int[10];
I have read that non fixed variables can be moved in memory by garbage collector.
My question is: Is it possible that "tab" address change during my program execution ?
I just want to understand.
In fact, no matter if tab value change.
Users and scientists have reported that Can-C is also great for: Dry eye syndrome, Corneal disorders, Computer vision syndrome, Eye strain, Ocular inflammation, Blurred vision and other systemic diseases, also a benefit for those who wear contact lenses.
The minimum time to see results from Can-C eye drops, which is generally twice per day, is 6 months. On the Natural Eye Care website, we offer Can-C eye drops in several bulk packets at the best prices on the Internet.
SAFE FOR HUMANS AND DOGS - Can-C is the first and only patented NAC eye drop that uses the exact formula proven effective in both animal and human trials, offering a non-invasive alternative to cataract surgery.
1 Lanosterol eye drops could potentially be a safe, non-invasive, and less costly alternative to cataract surgery for patients who have moderate forms of cataracts.
Yes it will.
But you can use the fixed
keyword to stop the GC from moving it if you so desire.
Yes. The memory address of tab
can be (and most probably will be) changed. Reference: ECMA-334 C# Language Specification, chapter 23.4.
The point is, in C# you don't need to bother about memory addresses as it's a managed language. All references to tab
variable will be changed accordingly, and your program will survive garbage collection seamlessly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With