
On Mon, Sep 8, 2008 at 11:04 AM, Hendrik Schober <spamtrap@gmx.de> wrote:
For the proprietary smart pointer this allocation can be tweaked by passing allocators as template arguments, while 'shared_ptr' seems not to allow this.
In that aspect shared_ptr is better because it allows you to use custom allocators without affecting the static type of the shared_ptr; in other words, two shared_ptr<foo> objects have the same type (shared_ptr<foo>) regardless whether they've been allocated with the default allocator or not. This makes it possible to create shared_ptr factories which pick the best allocation strategy *per instance* without affecting user code. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode