[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Memory needs for table keys
- From: "Krawtschunowski, Wladimir" <WKrawtschunowski@...>
- Date: Mon, 13 Dec 2010 08:30:53 +0100
Hi, all!
Does lua reserve any memory for saving keys of tables, if the values are all nil? Assume we have the code:
-----------
a={}; b={}; c={}
a[1000]=1
b[1] = 2; b[1000] = 1; b[1] = nil
c[1] = 11
-----------
The question is, if lua allocates memory for the 1. until 999. numerical keys of the table a (because the first valid key is 1000), or not=? Is after the execution any difference between the tables a and b?
Thank you.
--
Wladimir Krawtschunowski
Software developer
Vectron Systems AG
Willy-Brandt-Weg 41
48155 Münster, Germany
Tel.: +49/251/28 56-0
---
Vectron Systems AG, Willy-Brandt-Weg 41, 48155 Münster, Germany, Phone +49-251-2856-0, Fax +49-251-2856-560,
Amtsgericht Münster HRB 10502, Vorstand / Board of Management: Jens Reckendorf, Thomas Stümmler,
Aufsichtsrat / Supervisory Board: Christian Ehlers (Vorsitz / Chairman)