On Fri, Mar 6, 2009 at 5:50 AM, marc <[email protected]> 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~----------~----~----~----~------~----~------~--~---
