Documentation Typos/Errors, etc

Tiny typo…

“This message is send for all collision objects. It has the following fields set:”

Should be sent not send on page…

It’s easy to forget that each call to vmath.vector3() creates a new object. Let’s find out how much memory one vector3 uses:

print(collectgarbage(“count”) * 1024) – 41628
local v = vmath.vector3()
print(collectgarbage(“count”) * 1024) – 41678
70 bytes has been added between the calls to collectgarbage(). Note though that each printing of the result from collectgarbage() builds a string which in itself adds 22 bytes of garbage:

In garbage collection section I believe that’s 50 bytes… And is it 50 including the 22 the calls itself are generating there, which is explained just after, or not? It’s a bit confusing, and while the major point is sound overall, in the larger section is all the math itself accurate?

@sicher, this is for you!

Thanks. I’ll double check this.

The numbers in the comments are not correct, but the math is. It’s 70 bytes including the string built in the call. I’ll fix this and clarify a bit.

1 Like