From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-07-23 14:33:47
From: "Philippe A. Bouchard" <philippeb_at_[hidden]>
> > > Can it be applied to TrollTech's QListView for example?
> > I'm not familiar with that, but I don't see why not.
> It's a widget with a disabled copy contructor. The original constructor
> important and cannot be wrapped. You cannot also just rewrite it to make
> derive from counted_base.
Well, you can - if you must.
struct myQListViewImpl: public QListView, public counted_base
// forwarding constructors here
shared_ptr<QListView> pv(new myQListViewImpl);
You can even play some template tricks to autogenerate myQListViewImpl.
> The only option left is a separate reference counter thus efficienty is
> right now.
Not that much, though. The only difference is the added dynamic memory
allocation, and if it happens to hit the optimized small object allocator,
the efficiency will remain at acceptable levels.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk