DerekRies/dima — pull request #1 by Osmose (2013-08-17 15:21:34+00:00)
Title: Reset component state when it is reused.

If a component is reused, it retains the old state from before it was destroyed. Consider a box with an X/Y value. If the component constructor sets those to zero, it's reasonable to assume that when you attach the component to an entity the X/Y values will be zero. But if a component was reused, they may be any old value.

By resetting the component state whenever it's used, you still get the benefit of reusing objects (I'm fuzzy on if this is a benefit because I'm no JS Perf expert but I assume it is) without the ambiguity of what the initial values of attributes on the component will be.