Projects/Honey/Honey/Layers/LayerStack.cpp
LayerStack::~LayerStack()
{
	// Destroy all layers
	for (Layer* layer : _layers)
	{
		layer->onDetach(); // But before detach them
		delete layer;
	}
}
/**
 * Layer stack is composed by two kind of layers:
 * - Layers
 * - Overlays
 * 
 * The layer stack is intended to be structured following this rule:
 * - Layers are found firsts
 * - The later a layer got pushed, the higher its index will be
 * - Overlays are found seconds
 * - The later an overlay got pushed, the higher its index will be
 * - Layers are found in range [0; insert index)
 * - Overlays are found in range [insert index, number of elements)
*/
Layer stack is composed by two kind of layers:
- Layers
- Overlays


Layer stack is composed by two kind of layers : - Layers - Overlays
LayerStack::~LayerStack()
{
	for (Layer* layer : _layers)
	{
		layer->onDetach(); 
		delete layer;
	}
}
LayerStack :: ~ LayerStack ( ) { for ( Layer * layer : _layers ) { layer -> onDetach ( ) ; delete layer ; } }
Layer stack is composed by two kind of layers:
 - Layers
 - Overlays
Layer stack is composed by two kind of layers : - Layers - Overlays
// Destroy all layers // But before detach them