public void Draw() { // 3. When a request comes in, the real object is // created "on first use" if (m_RealImage == null) { m_RealImage = new RealImage(); } // 4. The request is always delegated m_RealImage.Draw(); }
public ImageProxy() { m_Id = s_Next++; // 2. Initialized to null m_RealImage = null; }