|
This is the "standard" way of storing refs inside objects -
you just save the reference, and don't make a copy of the
complex structure it contains (especially since this might
not always be possible as in the case of objects). It's not
necessarily a violation of data encapsulation per se,
however, in your case you are levying the additional
requirement that a copy of this particular data be stored
inside the object. This is fine, but you need to handle
that aspect yourself, as I illustrated in my previous reply.
|