function PartCacheStatic.Dispose(y)assert(getmetatable(y)==PartCacheStatic,ERR_NOT_INSTANCE:format("\068\105\115\112\111\115\101","\080\097\114\116\067\097\099\104\101\046\110\101\119"))for y,m in y.Open do m:Destroy()end for y,m in y.InUse do m:Destroy()end y.Template:Destroy()y.Open={}y.InUse={}y.CurrentCacheParent=nil y.GetPart=nil y.ReturnPart=nil y.SetCacheParent=nil y.Expand=nil y.Dispose=nil end return PartCacheStatic
-- Destroys this cache entirely. Use this when you don't need this cache object anymore.
function PartCacheStatic:Dispose()
	assert(getmetatable(self) == PartCacheStatic, ERR_NOT_INSTANCE:format("Dispose", "PartCache.new"))

	for _, object in self.Open do
		object:Destroy()
	end

	for _, object in self.InUse do
		object:Destroy()
	end

	self.Template:Destroy()

	self.Open = {}
	self.InUse = {}

	self.CurrentCacheParent = nil
	self.GetPart = nil
	self.ReturnPart = nil
	self.SetCacheParent = nil
	self.Expand = nil
	self.Dispose = nil
end

return PartCacheStatic
