function ServiceBag.Destroy(T)local z=getmetatable(ServiceBag)T._destroying:Fire()local C=T._services local M,s=next(C)while s~=nil do C[M]=nil if s.Destroy then s:Destroy()end M,s=next(C)end z.Destroy(T)end return ServiceBag

function ServiceBag:Destroy()
	local super = getmetatable(ServiceBag)

	self._destroying:Fire()

	local services = self._services
	local key, service = next(services)
	while service ~= nil do
		services[key] = nil
		if service.Destroy then
			service:Destroy()
		end
		key, service = next(services)
	end

	super.Destroy(self)
end

return ServiceBag
