First, I have a layer that I turn on and when I hit a button. (e.g. an abilities menu). This also creates a bunch of containers (4 object in each). Every time I open this menu I destroy the containers (via destroying one of the objects, which should destroy the whole thing right?) and recreate them, in case stuff has changed (got new abilitiy etc.)
If i open and close it 10 times it crashes eveyr time predictably. I can provide a cap if the answer isn't something already known but I feel like it probably is.
Second, LayerName makes everything lower case. Since layer names can be used in other contexts without being all lowr case (e.g. creating objects on a layer) this can be confusing and perhaps should be changed so that LayerName(LayerNumber) does not return the name of the layer in all lower case.