garrynewman/garrysmod — pull request #484 by Nebual (2013-08-04 04:24:14+00:00)
Title: Add new hook GM:OnMapCleanUp

It is called after game.CleanUpMap() is run.

This is useful so Prop Protections can reset what they think of as World owned entities, among other uses.

This addresses Facepunch/garrysmod-requests#1
It would probably be more appropriate to do in C, inside game.CleanUpMap() if possible, but this is an lua solution.