Andre Poenitz <[EMAIL PROTECTED]> writes: | On Mon, Jun 19, 2006 at 03:11:58PM +0200, Lars Gullik Bjønnes wrote: | > | I can't use reference because I want to be able to change work_area_ | > | at run-time. This work_area_ is not created nor deleted here so it is | > | a _safe_ use of pointer. Feel free to suggest something else that | > | retain polymorphisms. | > | > boost::shared_ptr<lyx::frontend::WorkArea, no_delete> work_area_; | > | > (you have to create the deleter though, no_delete is just an example) | | I doubt this improves readability.
Oh I agree. But with a typedef etc. then it could be quite readable, and trivial to understand that this pointer is only a cache. (typedef boost::shared_ptr<...> cache_ptr;) (Oh... x_x style... well it tries to mimic some boost code...) -- Lgb