Scrollview Bug (Case 37376) - strict to prevent leaks

Someone forgot to declare a variable (native sourced _scrollview) appropriately local and now it leaks out. It was introduced months ago. Running with strict.lua should be standard for Corona’s build and test, I think.

-- via http://metalua.luaforge.net/src/lib/strict.lua.html local mt = getmetatable(\_G) if mt == nil then mt = {} setmetatable(\_G, mt) end \_\_STRICT = true mt.\_\_declared = {} mt.\_\_newindex = function (t, n, v) if \_\_STRICT and not mt.\_\_declared[n] then local w = debug.getinfo(2, "S").what if w ~= "main" and w ~= "C" then error("assign to undeclared variable '"..n.."'", 2) end mt.\_\_declared[n] = true end rawset(t, n, v) end mt.\_\_index = function (t, n) if not mt.\_\_declared[n] and debug.getinfo(2, "S").what ~= "C" then error("variable '"..n.."' is not declared", 2) end return rawget(t, n) end function global(...) for \_, v in ipairs{...} do mt.\_\_declared[v] = true end end