Fixed memory leak in draw() in BattleLayer.