Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #32789
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2017-03-17 02:00 -0700 |
| Message-ID | <358e280c-4521-42fe-abcb-6926efa129c4@googlegroups.com> (permalink) |
| Subject | Save instance of array "undo" and copy it back to array. |
| From | jonas.thornvall@gmail.com |
Is there a way to get javascript tell how much space an array take up in memory?
If not, how would one go on calculate it?
I was thinking saving one or a few old instances of an array, creating an undo functionality. Could someone show the principle for that using a plain integer array.
This is my array and its attributes.
function autoNodes() {
for (var m = 0; m < nodes; m++) {
arr[m] = {
nodelinks: [],
hold: false,
rposX: 0,
rposY: 0,
rwidth: 10,
rheigth: 10,
rcolor: "red",
bcolor: "green",
print: true
};
}
}
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
Save instance of array "undo" and copy it back to array. jonas.thornvall@gmail.com - 2017-03-17 02:00 -0700
Re: Save instance of array "undo" and copy it back to array. JJ <jj4public@vfemail.net> - 2017-03-18 18:53 +0700
Re: Save instance of array "undo" and copy it back to array. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-03-18 15:01 +0100
csiph-web