Created
July 22, 2008 04:03
-
-
Save tekkub/640 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do | |
local mem = collectgarbage("count") | |
local s = "Hi" | |
for t=1,1000 do | |
x = function() print(s) end | |
end | |
ChatFrame1:AddMessage("Used: "..(collectgarbage("count") - mem)) | |
end | |
do | |
local mem = collectgarbage("count") | |
local s = "Hi" | |
local t = "Hi again" | |
for t=1,1000 do | |
x = function() print(s) end | |
end | |
ChatFrame1:AddMessage("Used: "..(collectgarbage("count") - mem)) | |
end | |
do | |
local mem = collectgarbage("count") | |
local s = "Hi" | |
local t = "Hi again" | |
for t=1,1000 do | |
x = function() print(s..t) end | |
end | |
ChatFrame1:AddMessage("Used: "..(collectgarbage("count") - mem)) | |
end | |
-- Results: | |
-- 31.28125 | |
-- 31.28125 | |
-- 66.4375 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment