Andre Poenitz wrote: > Hm. But it would be sufficient for the "users" to use the boost::weak_ptr, > there is no real need here to hand it out as such?
That is correct. We could have class InsetBase { public: BufferView * cachedview() { return view_.get(); } private: boost::weak_ptr<BufferView> view_; }; > > BufferView * cachedbv = view_.get(); > > if (cachedbv == 0) > > // do nothing. the parent pointer has been destroyed. > I see. That's the basic difference to a raw pointer... As with much boost stuff. Clever, but often overkill. (Is Lars a long way away?) > Ok. Maybe we could use the weak_pointer to be on the safe side and have a > look afterwards whether it is really needed. Sure. To paraphrase Pascal (I believe): I am sorry this letter is so long; I did not have time to write a shorter one. Often my code is like that :-( -- Angus