Update memory object when adding a class