Labels: Type-Defect Priority-Medium
New issue 542 by leening0...@gmail.com: The memory leak problem
In the resume of protocol buffer, there are some descriptions like
these: "Reuse message objects when possible. Messages try to keep around
any memory they allocate for reuse, even when they are cleared. Thus, if
you are handling many messages with the same type and similar structure in
succession, it is a good idea to reuse the same message object each time to
take load off the memory allocator. However, objects can become bloated
over time, especially if your messages vary in "shape" or if you
occasionally construct a message that is much larger than usual. You should
monitor the sizes of your message objects by calling the SpaceUsed method
and delete them once they get too big. Your system's memory allocator may
not be well-optimized for allocating lots of small objects from multiple
threads. Try using Google's tcmalloc instead. "
Therefore, I use the tcmalloc in my codes, instead of the new. However,
when I call the virtual function in my class, it will cause a core. Can the
tcmalloc replace the new? How can I avoid the core caused by virtual
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
You received this message because you are subscribed to the Google Groups "Protocol
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.