tangrams/tangram — pull request #40 by bcamper (2014-10-18 03:21:13+00:00)
Title: Destroy all resources

Following up https://github.com/tangrams/tangram/commit/20f577127304e5ecffd47b0b2f32c06487b2a1df & https://github.com/tangrams/tangram/commit/f22d80e16319686d100d09578f3e22f0aed482cc with more scene, GL resource, and leaflet layer clean-up.

It's now safe to remove the leaflet layer (however, the layer currently cannot be re-added to the map; we may want to add support for that, which will require re-initializing the scene). It's also safe to individually delete different scene components (a texture, render mode, program, etc.) without causing GL or JS errors.