function ServiceBag.Destroy(Q)local B=getmetatable(ServiceBag)Q._destroying:Fire()local Z=Q._services local X,n=next(Z)while n~=nil do Z[X]=nil if n.Destroy then n:Destroy()end X,n=next(Z)end B.Destroy(Q)end return ServiceBag
--[=[
	Cleans up the service bag and all services that have been
	initialized in the service bag.
]=]
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
