I'm not really sure what you're trying to do. You can pass a null pointer
for the elements parameter and that will have the effect of just removing
elements from the repeated field, but ultimately the memory won't be
released until the RepeatedField is destroyed.

On Tue, Feb 26, 2019 at 1:27 AM 윤석영 <youn3...@gmail.com> wrote:

> Thank you for your answer.
> So, If I want to just release the memory, Is there nothing I have to
> except to assign null pointer for elements argument ?
>
> 2019년 2월 1일 금요일 오전 4시 11분 6초 UTC+9, Adam Cozzette 님의 말:
>>
>> ExtractSubrange will just copy the values into an array that you provide,
>> so it's up to you how you want to manage that memory.
>>
>> On Thu, Jan 31, 2019 at 4:19 AM 윤석영 <youn...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I have a question about ExtractSubrange.
>>>
>>> When calling the ExtractSubrange function, do I have to release the
>>> memory of the extracted List?
>>>
>>> void RepeatedField::ExtractSubrange(
>>>         int start,
>>>         int num,
>>>         Element * elements)
>>>
>>> if I have to do, when elements is NULL, how can I do it.
>>>
>>>
>>> Thank you
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Protocol Buffers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to protobuf+u...@googlegroups.com.
>>> To post to this group, send email to prot...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/protobuf.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to protobuf@googlegroups.com.
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to