generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Overriding existing values

Previous Thread :: Next Thread 
Invig is not online. Invig
Joined: 02 May 2017
Total Posts: 22
31 Jul 2017 06:18 PM
If I were to do this:

local MyTable = {}
MyTable["Test"] = 123

MyTable["Test"] = 456

What exactly will happen to "123"? Will it just be cleaned up by the garbagecollector?
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
31 Jul 2017 06:19 PM
the place where the data '123' was held now holds new data of '456'
Report Abuse
Invig is not online. Invig
Joined: 02 May 2017
Total Posts: 22
31 Jul 2017 06:21 PM
Yes I know that, but where did the old "123" go? Will it still exist or will it be removed?
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
31 Jul 2017 06:24 PM
imagine somewhere in memory there is this value:
00000000 01111011

when you run that code, that same place in memory now holds this value:
00000001 11001000

this is simplified of course from what's actually happening. Point is, the 123 no longer is stored as a value anywhere.
Report Abuse
Invig is not online. Invig
Joined: 02 May 2017
Total Posts: 22
31 Jul 2017 06:25 PM
Okay thank you.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image