next up previous
Next: S.1.17 Public data Up: Scanner Bugs Previous: S.1.15 Marchalling stategy

S.1.16 Side Effects in Constructor Initilizer Lists

Added 1.6.95. Jonathan Poole

If we have a UC++ class that has a constructor with an initilizer list such as

  MatrixMultiplier(int n, int m)
    :rows(n),columns(m),runningTotal(0)
      { 
       ...code..
      }

this is converted by the scanner to

  MatrixMultiplier(int n, int m)
    :rows(n),columns(m),runningTotal(0)
      { 
       if non local object redirect to server machine
       else
       ...code..
      }

Thus the code in the constructor is exectuted only on the machine holding the actual objects and not on the proxies. However the initilizer list comes before this redirector and is thus executed also on the proxies. If there are side effects from the initializers there may be problems.



Jonathan Poole
Tue Jun 27 16:38:45 BST 1995