Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.87k stars 826 forks source link

Avoid Rectangle object creation #733

Closed Fraggle closed 9 years ago

Fraggle commented 9 years ago

Just a quick fix, I guess it's harmless.

PrimaryFeather commented 9 years ago

Jeff is right, the second one is too dangerous. If it's done that way, the static rectangle is passed outside the class, which means developers could end up storing it, and will be surprised that it constantly changes its value.

The first one is a good idea, though — I totally overlooked that. Thanks!