1

If I call apr_table_get, do I get a copy of the data or just a pointer into the pool with the data? (I want to change the value somehow and don't know if I would be crushing the pool data.) Also, do I need to free the data. The man page (Table and Array Functions) doesn't answer this question.

No One in Particular
  • 2,846
  • 4
  • 27
  • 32

1 Answers1

3

You get a copy of the pointer. So, no. If you want a copy of the data it points to, you need to make one.

This is why the return type is const!

j0k
  • 22,600
  • 28
  • 79
  • 90
Matt
  • 31
  • 2