I was working on some C# code, and have 8 Points, which are being put into 6 Point arrays, each one with different combinations similar to the sample below:
Point pt10 = new Point(10,10);
Point pt20 = new Point(20,20);
Point pt30 = new Point(30,30);
Point[] ptArr1 = {pt10, pt20};
Point[] ptArr2 = {pt10, pt30};
I then noticed, that after initializing the Point arrays, changes to the Points were not reflected in the array, which tells me the arrays contain copies of the original Points, and not the Points themselves. Is this wasteful in terms of memory, and if so, is there a way I can make the arrays reference the Points, instead of copying the values?