Open sswei opened 11 years ago
// If |out_value| is non-NULL, the removed Value AND ITS OWNERSHIP will be // passed out via |out_value|.
which means that the *out_value
will point to the removed Value.(You just remove the pointer from the list_
, do not need to delete the memory.) And who use this function should manage the memory.
I get it!THX!
// Removes the Value with the specified index from this list. // If |out_value| is non-NULL, the removed Value AND ITS OWNERSHIP will be // passed out via |out_value|. If |out_value| is NULL, the removed value will // be deleted. This method returns true if |index| is valid; otherwise // it will return false and the ListValue object will be unchanged. virtual bool Remove(size_t index, Value\ out_value);
师兄,这个函数不就是remove掉一个元素就好了吗?out_value不为空会怎样?没看懂。。