Developers should be allowed to be aware of when a Function is created, and when it is destroyed, to clean up resources (e.g. close DB connections; stop background processes; etc).
For Java functions, and I assume .NET, one can use the class constructor to be aware of when the Function is created, and perform a 'setup'. But the same does not happen for when the function is to be killed/removed/purged.