I have a class like this,
public class Cube
{
private int[,] data;
public Cube()
{
data[,] = new int[3,3];
data[0,0] = 1;
data[1,0] = 2;
// etc
}
public void RotateFrontOfCube()
{
// code
}
public void RotateBackOfCube()
{
// code
}
If I have a dictionary and add instances of this class to the dictionary, how much memory will be used?
Does the instance of the class somehow represent just the data required for the class? Or the data plus the methods?
If I add more code to the class does the memory usage increase against instances of this class?
I am building a tree of this data in an attempt to analyse rubiks cube solutions, but it uses a lot of memory.
By the way, my class above has been simplified, and doesn't represent a full rubiks cube data.