A memory leak appears to have been introduced to server side rendering in React 15.3.0 when `NODE_ENV != production`.

With `NODE_ENV=development`, the size of the heap grows proportionally to the number of requests received. This was confirmed in both Node v6.3.0 and v0.12.3. Also it was **confirmed to work correctly in React 15.2.0**.

_To reproduce_: Start the app configured for server-side rendering with `NODE_ENV=development` (or just not production). Inspect the V8 heap before and after hitting your server with a number of requests. I used [heapdump](https://github.com/bnoordhuis/node-heapdump) to take the snapshots and [wrk](https://github.com/wg/wrk) to hit my app with a bunch of requests. Load the snapshots into chrome dev tools profiler. Here is what I see:
<img width="1278" alt="screen shot 2016-08-02 at 12 47 34 pm" src="https://cloud.githubusercontent.com/assets/7452924/17343291/b8922606-58b1-11e6-9891-b6dbc22edc29.png">

The culprit appears to be the [react children mutation warning](https://github.com/facebook/react/blob/328fc75bc910032ff37dc9d93429fb14b476bd0d/src/renderers/shared/hooks/ReactChildrenMutationWarningHook.js#L18). `onBeforeComponentMount` saves a reference to a given React Element and all of its props in the `elements` object, but the cleanup steps `onComponentHasMounted` or `onComponentHasUpdated` are never called on the server and thus the `elements` object is ever growing.

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
react - 15.3.0
react-dom - 15.3.0
node - 6.3.0 || 0.12.3
express - ^4.0.0

return str.replace(/\(at .+?:\d+\)/g, '(at **)');
    }
    spyOn(console, 'error');
    var children = [<span key={0} />, <span key={1} />, <span key={2} />];
    var element = <div>{children}</div>;
    children[1] = <p key={1} />; 
    ReactServerRendering.renderToString(element);
    expect(console.error.calls.count()).toBe(1);
    expect(normalizeCodeLocInfo(console.error.calls.argsFor(0)[0])).toBe(
      'Warning: Component\'s children should not be mutated.\n    in div (at **)'
    );
  });
  it('should warn when children are mutated', () => {
    function normalizeCodeLocInfo(str) {
      return str.replace(/\(at .+?:\d+\)/g, '(at **)');
    }
    spyOn(console, 'error');
    var children = [<span key={0} />, <span key={1} />, <span key={2} />];
    function Wrapper(props) {
      props.children[1] = <p key={1} />; 
      return <div>{props.children}</div>;
    }
    ReactServerRendering.renderToString(<Wrapper>{children}</Wrapper>);
    expect(console.error.calls.count()).toBe(1);
    expect(normalizeCodeLocInfo(console.error.calls.argsFor(0)[0])).toBe(
      'Warning: Component\'s children should not be mutated.\n    in Wrapper (at **)'
    );
  });
});