Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Cheat Engine Forum Index
PostGo back to topic
ParkourPenguin
I post too much
Reputation: 150
Joined: 06 Jul 2014
Posts: 4652

PostPosted: Sat May 21, 2016 9:58 am    Post subject:

That won't give you all the created Lua forms if you assign two forms to the same global variable (or if you don't store the form in a global variable). Take this code as an example:
Code:
-- creates a copy of the current _ENV
local bak = {}
for k,v in pairs(_ENV) do
  bak[k] = v
end

-- makes a form
createForm()

-- compares the current _ENV with the copy and prints any differences
for k,v in pairs(_ENV) do
  if not (bak[k] and bak[k] == v) then
    print("k:",k,"\tv:",type(v))
  end
end

This prints out nothing because no new global variables were added; however, it still created the form, and the memory that form takes up still exists. Just be careful with what you do and always destroy the stuff you don't need any more.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Post reviews:   Approve 1
Author Review
predprey
Review: Approve
Post reference:
ReviewPosted: Fri May 27, 2016 2:25 am


Back to top
View user's profile Send private message
Display:  
Cheat Engine Forum Index


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites