On Fri, Mar 6, 2009 at 5:50 AM, marc <vaill...@cis.jhu.edu> wrote:

> Isn't this a common scenario in C++ for which stdlib provides a simple
> solution, std::auto_ptr? std::auto_ptr is a lightweight class designed
> to "RAIIify" pointers.  What am I missing?


Deleting the objects on shutdown is easy.  The problem is that doing so
while another thread is still using them may crash the program.  If your
program is careful to shut down all background threads before exiting, then
it's fine, but many people write code which isn't so clean, and some of
these people insist that libraries should not delete their objects at exit
for exactly this reason.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to