Actually, on second thought, the Layer destructor should be calling clear_regions() (it isn't), which calls delete_region().