Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Snippet: UsedMemory — Gideros Forum

Snippet: UsedMemory

MikeHartMikeHart Guru
edited January 2012 in Code snippets
Here is a little snipped that will tell you how much memory is currently used and if a flag is set, will also call the garbadge collector
local UsedMemory = function(cleanup)
	if cleanup == true then
		collectgarbage()
	end
	local mem = collectgarbage("count")
	--print( "\nMemUsage: " .. mem )
	return mem
end

Likes: oleg

Tagged:
+1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.