Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Memory usage and 'copy question.

From: reboler::programmer::net at: 26-Feb-2002 15:21

I've read the docs and believe the following: Case 1 If I do new-value: copy value then I get a clone of 'value and both 'new-value and 'value take up the same amount of memory (disregarding the different names), such that now there is twice the amount used than with only 'value. Case 2 If I do new-value: value then I get a "pointer" named 'new-value that will give me 'value. I can change either 'value or 'new-value, and when called either will give the changed contents. *** Please confirm: in this second case, the amount of new memory used for 'new-value is only for creating the new name, and only one copy of the contents of 'value exists. In other words (approximately): (memory used in case 1) = 2 * (memory used in case 2)