Robert Vazan <[EMAIL PROTECTED]> writes: > On Sat, 11 Oct 2003 20:31:02 -0400 David Abrahams > <[EMAIL PROTECTED]> wrote: > >> I probably should keep smart-aleck questions to myself, but I have to >> ask why you're writing your own smart pointers at all? Boost's >> shared_ptr is pretty damned amazing; all of these little safety issues >> and design details have been taken care of, and it has an almost >> astounding ability to handle all kinds of interoperability >> issues... and of course we have scoped_ptr as well. > > Because Vadim has something against compatibility with VC6 and I have > something against performance, compatibility with bare pointers (we have > two-way conversion while boost insists that all pointers are converted to > shared_ptr after operator new and then only used)
Actually it is possible to detach the raw pointer using a custom deleter. You just use get_deleter to detect your custom deleter and tell it not to deallocate anything. > and inlining (I do care about binary size) ...and what about inlining? > BTW, we are rewriting boost::intrusive_ptr, not shared_ptr. We will > also have equivalent of weak_ptr, but specifically built for > intrusive reference counting. We will probably never optimize > anything, but boost doesn't optimize either. Not so. In fact we have a fast allocator option for those who worry about the cost of count allocation. And I don't know if you're talking about Boost as a whole or just the smart pointer library, but we have lots of optimizations in other parts of the library. >> Naturally, I can't imagine writing an application of the scale of >> Mahogany without simply adopting Boost as a standard piece of the >> infrastructure. There are just so many things that work better, >> faster, smarter when you take advantage of carefully designed >> libraries. > > It isn't that well designed. It's not optimized at all. Maybe you mean something by "optimized" that I'm not familiar with? We certainly use lots of optimizations. However, shared_ptr is specifically optimized for interoperability at the expense of size, which could in theory affect performance *but nobody has ever shown it to be a measurable bottleneck*. > It relies on compilers that don't exist. That's an outlandish claim. > And, after all, it has strictier license than our own code. Really? It's about as loose as they come, short of "public domain". > Of course, I am not happy about this situation. After spending > several hours on it, I really hate this weak pointer business (but > then it included conversion of legacy code). But to utilize external > solution, we would need bug-free and optimizing compilers and > availability of the library in public domain or under non-Gpl > opensource license. Boost is emphatically non-GPL. All source can be used for any purpose without restriction except reproduction of the license and copyright in the source. See http://www.boost.org/more/lib_guide.htm#License. > wxWindows is enough to drain bug-fixing time and > c-client is enough to limit our distribution. Both are more > important than Boost. Whatever, buddy. It's your nickel ;-> -- Dave Abrahams Boost Consulting www.boost-consulting.com ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Mahogany-Developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mahogany-developers