Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why are the pseudo-tables arrays of pointers?

arrays pointers
0
10 Posted

Why are the pseudo-tables arrays of pointers?

0
10

The short answer is to save memory. If rta_add_table() were to copy the table definition your application would have the definition two places in memory: internal to RTA, and in your application code. By saving the pointers to the table and column definitions we avoid using lots of memory to duplicate data. Saving pointers has the second advantage of letting you change the table definition on the fly if needed.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123