Is this a safe way to reference objects in JavaScript?
<p>If I were to define two objects myDataStore and myDrawer something like this:</p>

<pre><code>var myDataStore = function(myObjectRef) {
    this.myInternalObject = myObjectRef;
};

var myDrawer = function(myObjRef) {
    this.myInternalObject = myObjectRef;
};
</code></pre>

<p>And if I were to create an object like so:</p>

<p>[[EDIT - Adjusted Object Creation to Ensure 'this' is being mapped to myObject, not the global window object]]</p>

<pre><code>(function(){
  var myObject = window.myObject = function(){
      this.dataStore = new myDataStore(this);
      this.drawer = new myDrawer(this);
  }
 })();
</code></pre>

<p>Then myObject.dataStore.myInternalObject, and myObject.drawer.myInternalObject,  would simply be pointers back to the original 'myObject' - not taking up any additional memory in the browser.  Yes?</p>

<p>I am interested in implementing techniques like this - as it makes it easy for objects to communicate with each other.</p>
