Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我调用 apr_table_get,我会得到数据的副本还是只是指向包含数据的池的指针?(我想以某种方式更改值,不知道我是否会破坏池数据。)另外,我是否需要释放数据。手册页(Table and Array Functions)没有回答这个问题。
您将获得指针的副本。所以不行。如果您想要它指向的数据的副本,则需要制作一个。
这就是为什么返回类型是 const!