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 n=1,#Y.Open,1 do Y.Open[n]:Destroy()end for n=1,#Y.InUse,1 do Y.InUse[n]: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 i = 1, #self.Open do
		self.Open[i]:Destroy()
	end
	for i = 1, #self.InUse do
		self.InUse[i]: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
